Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
public readonly confirmButton = () => Swal.getConfirmButton();
return new Promise((resolve, reject) => {
if (swal.getConfirmButton) {
const res = swal.getConfirmButton();
if (res) {
resolve(res);
}
}
reject(new Error('No swal found'));
});
}