Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function addAttachmentLayout(currentActivity, rest) {
if (rest && rest.toLowerCase() == AttachmentLayoutTypes.Carousel)
currentActivity.attachmentLayout = AttachmentLayoutTypes.Carousel;
else if (rest && rest.toLowerCase() == AttachmentLayoutTypes.List)
currentActivity.attachmentLayout = AttachmentLayoutTypes.List;
else
console.error(`AttachmentLayout of ${rest[0]} is not List or Carousel`);
}
function addAttachmentLayout(currentActivity: Activity, type: AttachmentLayoutTypes) {
if (type.toLowerCase() === AttachmentLayoutTypes.Carousel) {
currentActivity.attachmentLayout = AttachmentLayoutTypes.Carousel;
} else if (type.toLowerCase() === AttachmentLayoutTypes.List) {
currentActivity.attachmentLayout = AttachmentLayoutTypes.List;
} else {
console.error(`AttachmentLayout of ${ type } is not List or Carousel`);
}
}
function addAttachmentLayout(currentActivity, rest) {
if (rest && rest.toLowerCase() == AttachmentLayoutTypes.Carousel)
currentActivity.attachmentLayout = AttachmentLayoutTypes.Carousel;
else if (rest && rest.toLowerCase() == AttachmentLayoutTypes.List)
currentActivity.attachmentLayout = AttachmentLayoutTypes.List;
else
console.error(`AttachmentLayout of ${rest[0]} is not List or Carousel`);
}
function addAttachmentLayout(currentActivity: Activity, type: AttachmentLayoutTypes) {
if (type.toLowerCase() === AttachmentLayoutTypes.Carousel) {
currentActivity.attachmentLayout = AttachmentLayoutTypes.Carousel;
} else if (type.toLowerCase() === AttachmentLayoutTypes.List) {
currentActivity.attachmentLayout = AttachmentLayoutTypes.List;
} else {
console.error(`AttachmentLayout of ${ type } is not List or Carousel`);
}
}