Skip to content

Commit cf2be1b

Browse files
committed
fix bind:online in dev mode (#1502)
1 parent 5479973 commit cf2be1b

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/compile/nodes/Window.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,9 @@ export default class Window extends Node {
200200
const handlerName = block.getUniqueName(`onlinestatuschanged`);
201201
block.builders.init.addBlock(deindent`
202202
function ${handlerName}(event) {
203+
${compiler.options.dev && `component._updatingReadonlyProperty = true;`}
203204
#component.set({ ${bindings.online}: navigator.onLine });
205+
${compiler.options.dev && `component._updatingReadonlyProperty = false;`}
204206
}
205207
window.addEventListener("online", ${handlerName});
206208
window.addEventListener("offline", ${handlerName});

0 commit comments

Comments
 (0)