@blocksuite/store
Advanced tools
Comparing version 0.3.0-20221222101809-cd02016 to 0.3.0-20221223060814-a3b97f6
@@ -19,3 +19,5 @@ import * as Y from 'yjs'; | ||
const hasKey = (k) => e.target === this._yMetaRoot && e.changes.keys.has(k); | ||
if (e.target === this._yPages || hasKey('pages')) { | ||
if (e.target === this._yPages || | ||
e.target.parent === this._yPages || | ||
hasKey('pages')) { | ||
this._handlePageEvent(); | ||
@@ -22,0 +24,0 @@ } |
{ | ||
"name": "@blocksuite/store", | ||
"version": "0.3.0-20221222101809-cd02016", | ||
"version": "0.3.0-20221223060814-a3b97f6", | ||
"description": "BlockSuite data store built for general purpose state management.", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -201,2 +201,7 @@ /* eslint-disable @typescript-eslint/no-restricted-imports */ | ||
let called = false; | ||
workspace.meta.pagesUpdated.on(() => { | ||
called = true; | ||
}); | ||
workspace.setPageMeta('page0', { favorite: true }); | ||
@@ -217,2 +222,3 @@ assert.deepEqual( | ||
); | ||
assert.ok(called); | ||
}); | ||
@@ -219,0 +225,0 @@ |
@@ -195,3 +195,7 @@ import * as Y from 'yjs'; | ||
if (e.target === this._yPages || hasKey('pages')) { | ||
if ( | ||
e.target === this._yPages || | ||
e.target.parent === this._yPages || | ||
hasKey('pages') | ||
) { | ||
this._handlePageEvent(); | ||
@@ -198,0 +202,0 @@ } else if (hasKey('name') || hasKey('avatar')) { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
383268
6331
11104