diff options
author | Hayleigh Thompson <me@hayleigh.dev> | 2024-01-26 23:33:11 +0000 |
---|---|---|
committer | Hayleigh Thompson <me@hayleigh.dev> | 2024-01-26 23:33:11 +0000 |
commit | 235fcd2ae0229272ebb0927806d301c8b887c1ba (patch) | |
tree | 279fc8348bea9850a2719569a63cef6d438feeda /src/client-runtime.ffi.mjs | |
parent | 2d5b7c095e26f46137b920315a7468eab2f1944c (diff) | |
download | lustre-235fcd2ae0229272ebb0927806d301c8b887c1ba.tar.gz lustre-235fcd2ae0229272ebb0927806d301c8b887c1ba.zip |
:recycle: Temporarily disable a performance optimisation that caused bugs with input elements.
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 ----------------------------------------------------------------------- |