diff options
author | Hayleigh Thompson <me@hayleigh.dev> | 2023-07-23 19:37:57 +0100 |
---|---|---|
committer | Hayleigh Thompson <me@hayleigh.dev> | 2023-07-23 19:37:57 +0100 |
commit | 726a5b931104260ad17c3cf08d5a40c903fced97 (patch) | |
tree | 47f9b4b99c54779357d0b4b963d96a2022d07444 /src | |
parent | 973d721a032bb5db96f8f3736ac84386a9456540 (diff) | |
download | lustre-726a5b931104260ad17c3cf08d5a40c903fced97.tar.gz lustre-726a5b931104260ad17c3cf08d5a40c903fced97.zip |
:bug: Fixed a bug where effects were passed a dispatch function with an unbound 'this'.
Diffstat (limited to 'src')
-rw-r--r-- | src/lustre.ffi.mjs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/lustre.ffi.mjs b/src/lustre.ffi.mjs index 2ebb0a9..9abc107 100644 --- a/src/lustre.ffi.mjs +++ b/src/lustre.ffi.mjs @@ -104,8 +104,9 @@ export class App { // Each update can produce effects which must now be executed. while (this.#effects[0]) - this.#effects.shift()(this.dispatch, (name, data) => - this.emit(name, data) + this.#effects.shift()( + (msg) => this.dispatch(msg), + (name, data) => this.emit(name, data) ); // Synchronous effects will immediately queue a message to be processed. If |