From 1b9943a4c812a2e63bf6e940ec5a8608237ce050 Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Wed, 14 Nov 2018 15:45:03 -0500 Subject: [PATCH] allow swal single button --- src/services/webPlatformUtils.service.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/services/webPlatformUtils.service.ts b/src/services/webPlatformUtils.service.ts index 55f316e6d1..ba869ad156 100644 --- a/src/services/webPlatformUtils.service.ts +++ b/src/services/webPlatformUtils.service.ts @@ -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; }