From 5a7d9883247d3ab53460a225ec1f1a69e30e3f61 Mon Sep 17 00:00:00 2001 From: Ardis Lu Date: Tue, 9 Aug 2022 21:00:47 -0700 Subject: [PATCH] Fix global reference to toast --- script.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/script.js b/script.js index 8babef2..47b3c47 100644 --- a/script.js +++ b/script.js @@ -10,7 +10,7 @@ const cacheChannel = new BroadcastChannel('cache'); cacheChannel.addEventListener('message', e => { // Ignore static assets like logo.svg, style.css, script.js, etc. if (new URL(e.data.resource).pathname === '/api' && e.data.isUpdated) { - toast.show(); + globalThis.components.get('toast').show(); } }); document.querySelector('dialog > button').addEventListener('click', _ => location.reload()); -- 2.47.3