mirror of
https://github.com/toeverything/AFFiNE.git
synced 2024-11-22 09:13:18 +03:00
fix: patch package y-indexeddb
(#1651)
This commit is contained in:
parent
180382daf5
commit
e2395af827
13
.yarn/patches/y-indexeddb-npm-9.0.9-6bd9b26461.patch
Normal file
13
.yarn/patches/y-indexeddb-npm-9.0.9-6bd9b26461.patch
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
diff --git a/src/y-indexeddb.js b/src/y-indexeddb.js
|
||||||
|
index 68b7b1b2f71239fbd0c89e50a94931965661d651..186b35323e256808b2535c02d9a4830794a1649d 100644
|
||||||
|
--- a/src/y-indexeddb.js
|
||||||
|
+++ b/src/y-indexeddb.js
|
||||||
|
@@ -95,7 +95,7 @@ export class IndexeddbPersistence extends Observable {
|
||||||
|
* @param {any} origin
|
||||||
|
*/
|
||||||
|
this._storeUpdate = (update, origin) => {
|
||||||
|
- if (this.db && origin !== this) {
|
||||||
|
+ if (this.db && !(origin instanceof IndexeddbPersistence)) {
|
||||||
|
const [updatesStore] = idb.transact(/** @type {IDBDatabase} */ (this.db), [updatesStoreName])
|
||||||
|
idb.addAutoKey(updatesStore, update)
|
||||||
|
if (++this._dbsize >= PREFERRED_TRIM_SIZE) {
|
@ -67,5 +67,8 @@
|
|||||||
"vitest": "^0.29.3",
|
"vitest": "^0.29.3",
|
||||||
"vitest-fetch-mock": "^0.2.2"
|
"vitest-fetch-mock": "^0.2.2"
|
||||||
},
|
},
|
||||||
"packageManager": "yarn@3.5.0"
|
"packageManager": "yarn@3.5.0",
|
||||||
|
"resolutions": {
|
||||||
|
"y-indexeddb@^9.0.9": "patch:y-indexeddb@npm%3A9.0.9#./.yarn/patches/y-indexeddb-npm-9.0.9-6bd9b26461.patch"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
13
yarn.lock
13
yarn.lock
@ -20416,7 +20416,7 @@ __metadata:
|
|||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
"y-indexeddb@npm:^9.0.9":
|
"y-indexeddb@npm:9.0.9":
|
||||||
version: 9.0.9
|
version: 9.0.9
|
||||||
resolution: "y-indexeddb@npm:9.0.9"
|
resolution: "y-indexeddb@npm:9.0.9"
|
||||||
dependencies:
|
dependencies:
|
||||||
@ -20427,6 +20427,17 @@ __metadata:
|
|||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
|
"y-indexeddb@patch:y-indexeddb@npm%3A9.0.9#./.yarn/patches/y-indexeddb-npm-9.0.9-6bd9b26461.patch::locator=AFFiNE%40workspace%3A.":
|
||||||
|
version: 9.0.9
|
||||||
|
resolution: "y-indexeddb@patch:y-indexeddb@npm%3A9.0.9#./.yarn/patches/y-indexeddb-npm-9.0.9-6bd9b26461.patch::version=9.0.9&hash=4f03bc&locator=AFFiNE%40workspace%3A."
|
||||||
|
dependencies:
|
||||||
|
lib0: ^0.2.35
|
||||||
|
peerDependencies:
|
||||||
|
yjs: ^13.0.0
|
||||||
|
checksum: 35079412e049c75359bbcd760d881b495db2386fb8acdc3f2b70dabdccf4f1ec43ab4b7958ea619cdb8a55b57ae26b3aad305daff38b3d9b56db79840892143b
|
||||||
|
languageName: node
|
||||||
|
linkType: hard
|
||||||
|
|
||||||
"y-protocols@npm:^1.0.5":
|
"y-protocols@npm:^1.0.5":
|
||||||
version: 1.0.5
|
version: 1.0.5
|
||||||
resolution: "y-protocols@npm:1.0.5"
|
resolution: "y-protocols@npm:1.0.5"
|
||||||
|
Loading…
Reference in New Issue
Block a user