Skip to content

Commit

Permalink
Merge branch 'main' into feat-edit-distance
Browse files Browse the repository at this point in the history
  • Loading branch information
hi-ogawa authored Nov 17, 2023
2 parents 455bd76 + c55125e commit bd1e451
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/fair-tools-study.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@hiogawa/tiny-store": patch
---

fix(tiny-store): fix cleanup for `listen/unlistenInternal`
2 changes: 1 addition & 1 deletion packages/tiny-store/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@hiogawa/tiny-store",
"version": "0.0.1-pre.3",
"version": "0.0.1-pre.4",
"homepage": "https://github.com/hi-ogawa/js-utils/tree/main/packages/tiny-store",
"repository": {
"type": "git",
Expand Down
3 changes: 2 additions & 1 deletion packages/tiny-store/src/local-storage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {
tinyStoreTransform,
} from "./core";

// ssr fallbacks to `defaultValue` which can cause hydration mismatch
// ssr fallbacks to `defaultValue` which could cause hydration mismatch
export function createTinyStoreWithStorage<T>(
key: string,
defaultValue: T,
Expand Down Expand Up @@ -77,5 +77,6 @@ class TinyStoreLocalStorageAdapter implements TinyStoreAdapter<string | null> {
}
tinyassert(this._unlisten);
this._unlisten();
this._unlisten = undefined;
}
}

0 comments on commit bd1e451

Please sign in to comment.