Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
return new Promise(async (resolve) => {
const content: string = await this.filterSlideContentSlots(slide);
if (!content || content.length <= 0) {
resolve(content);
return;
}
let result: string = await cleanContent(content);
if (!slide.hasAttribute('custom-background')) {
result = result.replace(/<div slot="background">(.*?)<\/div>/g, '');
}
resolve(result);
});
}</div>
return new Promise(async (resolve) => {
if (!slide || !slide.content || slide.content === undefined || slide.content === '') {
resolve(undefined);
return;
}
let result: string = await cleanContent(slide.content);
const customBackground: boolean = await this.hasCustomBackground(slide);
if (!customBackground) {
result = result.replace(/<div slot="background">(.*?)<\/div>/g, '');
}
result = result.replace(/<a slot="actions">/g, '');
result = result.replace(//g, '');
resolve(result);
});
}</a></div>