]> git.ardis.lu - ardislu.dev/commitdiff
Fix global reference to toast
authorArdis Lu <ardisglu@gmail.com>
Wed, 10 Aug 2022 04:00:47 +0000 (21:00 -0700)
committerArdis Lu <ardisglu@gmail.com>
Wed, 10 Aug 2022 04:00:47 +0000 (21:00 -0700)
script.js

index 8babef2920c8fb143619d40b613eac58fdf42a03..47b3c47488bc965211ff58867f9495a1a0cece89 100644 (file)
--- 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());
This page took 0.050264 seconds and 4 git commands to generate.