Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function preProcessSpecialProperties(properties) {
delete properties['oc.fieldName']
if (String(properties['oc.comment']).length > 0 && properties['oc.commentPosition'] == 'above') {
properties['commentAbove'] = properties['oc.comment']
if (properties['comment'] !== undefined) {
delete properties['comment']
}
delete properties['oc.comment']
delete properties['oc.commentPosition']
}
if (String(properties['oc.comment']).length > 0 && properties['oc.commentPosition'] == 'below') {
properties['comment'] = properties['oc.comment']
if (properties['comentAbove'] !== undefined) {
delete properties['comentAbove']
}
delete properties['oc.comment']
delete properties['oc.commentPosition']
}
if (properties['oc.comment'] !== undefined) {
if (String(properties['oc.comment']).length > 0) {
properties['comment'] = properties['oc.comment']
if (properties['comentAbove'] !== undefined) {
delete properties['comentAbove']
}
delete properties['oc.comment']
delete properties['oc.commentPosition']
}
if (properties['oc.comment'] !== undefined) {
if (String(properties['oc.comment']).length > 0) {
properties['comment'] = properties['oc.comment']
}
delete properties['oc.comment']
}
}
delete properties['oc.comment']
delete properties['oc.commentPosition']
}
if (String(properties['oc.comment']).length > 0 && properties['oc.commentPosition'] == 'below') {
properties['comment'] = properties['oc.comment']
if (properties['comentAbove'] !== undefined) {
delete properties['comentAbove']
}
delete properties['oc.comment']
delete properties['oc.commentPosition']
}
if (properties['oc.comment'] !== undefined) {
if (String(properties['oc.comment']).length > 0) {
properties['comment'] = properties['oc.comment']
}
delete properties['oc.comment']
}
}
function preProcessSpecialProperties(properties) {
delete properties['oc.fieldName']
if (String(properties['oc.comment']).length > 0 && properties['oc.commentPosition'] == 'above') {
properties['commentAbove'] = properties['oc.comment']
if (properties['comment'] !== undefined) {
delete properties['comment']
}
delete properties['oc.comment']
delete properties['oc.commentPosition']
}
if (String(properties['oc.comment']).length > 0 && properties['oc.commentPosition'] == 'below') {
properties['comment'] = properties['oc.comment']
if (properties['comentAbove'] !== undefined) {
delete properties['comentAbove']
}