From 235fcd2ae0229272ebb0927806d301c8b887c1ba Mon Sep 17 00:00:00 2001 From: Hayleigh Thompson Date: Fri, 26 Jan 2024 23:33:11 +0000 Subject: :recycle: Temporarily disable a performance optimisation that caused bugs with input elements. --- src/client-runtime.ffi.mjs | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) (limited to 'src/client-runtime.ffi.mjs') 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 ----------------------------------------------------------------------- -- cgit v1.2.3