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(resolve => {
let html = this.converter.makeHtml(element.content);
if (navigator.onLine || (window as IAppWindow).isElectron) html = Twemoji.parse(html, icon => require(`twemoji/2/svg/${icon}.svg`));
resolve(html);
});
}