Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
if(viewfield == 'LinkTitle' || viewfield == 'LinkTitleNoMenu' || viewfield == 'LinkTitle2') {
viewFields.push('Title');
fieldOptions.push('Title');
} else {
fieldOptions.push(viewfield);
viewFields.push(viewfield);
listinfo.fields.set(viewfield,field.title);
}
}
});
listinfo.views.set(viewEntry.Id, {
id: viewEntry.Id,
title: viewEntry.Title,
query: viewEntry.ViewQuery,
viewFields: uniq(viewFields),
fieldChoices: uniq(fieldOptions),
});
});
viewFields.push('Title');
fieldOptions.push('Title');
} else {
fieldOptions.push(viewfield);
viewFields.push(viewfield);
listinfo.fields.set(viewfield,field.title);
}
}
});
listinfo.views.set(viewEntry.Id, {
id: viewEntry.Id,
title: viewEntry.Title,
query: viewEntry.ViewQuery,
viewFields: uniq(viewFields),
fieldChoices: uniq(fieldOptions),
});
});