1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-11-09 09:51:02 +01:00

allow swal single button

This commit is contained in:
Kyle Spearrin 2018-11-14 15:45:03 -05:00
parent 8232a4c9c8
commit 1b9943a4c8

View File

@ -226,9 +226,12 @@ export class WebPlatformUtilsService implements PlatformUtilsService {
contentDiv.appendChild(textDiv); contentDiv.appendChild(textDiv);
} }
const confirmed = await swal({ const confirmed = buttons.length > 1 ? await swal({
content: { element: contentDiv }, content: { element: contentDiv },
buttons: buttons, buttons: buttons,
}) : await (swal as any)({
content: { element: contentDiv },
button: buttons[0],
}); });
return confirmed; return confirmed;
} }