Closed walkr closed 6 months ago
Another way is to add semicolon after querySelectorAll(...)
--- a/priv/static/phoenix_live_reload.js
+++ b/priv/static/phoenix_live_reload.js
@@ -28,7 +28,7 @@ let repaint = () => {
let cssStrategy = () => {
let reloadableLinkElements = window.parent.document.querySelectorAll(
"link[rel=stylesheet]:not([data-no-reload]):not([data-pending-removal])"
- )
+ );
([].slice).call(reloadableLinkElements)
.filter(link => link.href)
This fixes this problem for me.
The issue is that without semicolon ([].slice)
is parsed as continuation of let
, and it tries to call what querySelectorAll
returned as a function with [].slice
argument.
@kolen Ah, gotcha! Thank you for the explanation!
❤️❤️❤️🐥🔥
Live reload was not loading on css changes. This update seems to fix it.