diff options
Diffstat (limited to 'src/client-runtime.ffi.mjs')
-rw-r--r-- | src/client-runtime.ffi.mjs | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/src/client-runtime.ffi.mjs b/src/client-runtime.ffi.mjs index 16895a7..bb3bf9d 100644 --- a/src/client-runtime.ffi.mjs +++ b/src/client-runtime.ffi.mjs @@ -61,21 +61,19 @@ export class LustreClientApplication { bubbles: true, detail: data, composed: true, - }) + }), ); } #tick() { this.#flush_queue(); - if (this.#didUpdate) { - const vdom = this.#view(this.#model); + const vdom = this.#view(this.#model); - this.#didUpdate = false; - this.#root = morph(this.#root, vdom, (msg) => { - this.send(new Dispatch(msg)); - }); - } + this.#didUpdate = false; + this.#root = morph(this.#root, vdom, (msg) => { + this.send(new Dispatch(msg)); + }); } #flush_queue(iterations = 0) { @@ -90,7 +88,7 @@ export class LustreClientApplication { while (this.#effects.length) { this.#effects.shift()( (msg) => this.send(new Dispatch(msg)), - (event, data) => this.emit(event, data) + (event, data) => this.emit(event, data), ); } @@ -121,7 +119,7 @@ export const start = (app, selector, flags) => selector, app.init, app.update, - app.view + app.view, ); // UTILS ----------------------------------------------------------------------- |