From b5292a1a25d0004384ad8a89338d0a4180b25306 Mon Sep 17 00:00:00 2001 From: Tobias Buschor Date: Thu, 2 Mar 2023 03:38:20 +0100 Subject: [PATCH] Update README.md --- README.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/README.md b/README.md index 5fc3e40..fb75d69 100644 --- a/README.md +++ b/README.md @@ -35,9 +35,7 @@ import {dialog} from "https://cdn.jsdelivr.net/gh/u1ui/dialog.js@x.x.x/dialog.mi To get sure your lib works even if the script does not load, you can fallback to the native confirm/alert/prompt function. ```js -const {confirm} = await import('../fails/dialog.js').catch(e=>{ - return {confirm: window.confirm}; -}); +const {confirm} = await import('../fails/dialog.js').catch(e=>window); await confirm('test'); ```