Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const insert = (vnode: any) => {
const dialog: any = document.querySelector('dialog');
dialogPolyfill.registerDialog(dialog);
if (props.active) {
dialog.showModal();
} else {
const overlay: any = document.querySelector('._dialog_overlay');
if (overlay != null) {
console.log('removing dialog overlay');
overlay.parentNode.removeChild(overlay);
}
}
};