From 2b0b8bfeb45eae300aea9b1fd55f20f546172013 Mon Sep 17 00:00:00 2001 From: Daniel Steigerwald Date: Tue, 30 Apr 2024 14:26:56 +0200 Subject: [PATCH] Fix bug --- .changeset/nine-bats-serve.md | 7 +++++++ packages/evolu-common/src/Evolu.ts | 5 ++++- 2 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 .changeset/nine-bats-serve.md diff --git a/.changeset/nine-bats-serve.md b/.changeset/nine-bats-serve.md new file mode 100644 index 000000000..7d7ddc34f --- /dev/null +++ b/.changeset/nine-bats-serve.md @@ -0,0 +1,7 @@ +--- +"@evolu/common": patch +--- + +Fix bug + +It was a silly typo; sorry about that. Ironically, tests didn't catch it because that was the one test I didn't port after refactoring. My bad. We will add more tests in the future. diff --git a/packages/evolu-common/src/Evolu.ts b/packages/evolu-common/src/Evolu.ts index 6aef4b67c..a18b9ec71 100644 --- a/packages/evolu-common/src/Evolu.ts +++ b/packages/evolu-common/src/Evolu.ts @@ -703,7 +703,10 @@ const createEvolu = ( * unwrap it without waiting a microtask." * https://github.com/acdlite/rfcs/blob/first-class-promises/text/0000-first-class-support-for-promises.md */ - Object.assign(loadingPromise, { status: "fulfilled", value: result }); + Object.assign(loadingPromise.promise, { + status: "fulfilled", + value: result, + }); if (loadingPromise.releaseOnResolve) { loadingPromises.delete(query); }