Merge pull request #247 from gbj/fix-integration-event-name

Correct `leptos_autoreload` event variable name
This commit is contained in:
Greg Johnston 2023-01-06 09:50:45 -05:00 committed by GitHub
commit 7e28f56f01
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View file

@ -299,7 +299,7 @@ where IV: IntoView
<script crossorigin="">(function () {{
var ws = new WebSocket('ws://{site_ip}:{reload_port}/live_reload');
ws.onmessage = (ev) => {{
let msg = JSON.parse(event.data);
let msg = JSON.parse(ev.data);
if (msg.all) window.location.reload();
if (msg.css) {{
const link = document.querySelector("link#leptos");

View file

@ -361,7 +361,7 @@ where
<script crossorigin="">(function () {{
var ws = new WebSocket('ws://{site_ip}:{reload_port}/live_reload');
ws.onmessage = (ev) => {{
let msg = JSON.parse(event.data);
let msg = JSON.parse(ev.data);
if (msg.all) window.location.reload();
if (msg.css) {{
const link = document.querySelector("link#leptos");