1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-09-15 02:18:42 +02: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);
}
const confirmed = await swal({
const confirmed = buttons.length > 1 ? await swal({
content: { element: contentDiv },
buttons: buttons,
}) : await (swal as any)({
content: { element: contentDiv },
button: buttons[0],
});
return confirmed;
}