mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-13 21:05:19 +00:00
fix(editor): repeat instantiation of std (#10896)
This commit is contained in:
@@ -77,7 +77,10 @@ export class EdgelessEditor extends SignalWatcher(
|
||||
changedProperties: Map<string | number | symbol, unknown>
|
||||
) {
|
||||
super.willUpdate(changedProperties);
|
||||
if (changedProperties.has('doc')) {
|
||||
if (
|
||||
this.hasUpdated && // skip the first update
|
||||
changedProperties.has('doc')
|
||||
) {
|
||||
this.std = new BlockStdScope({
|
||||
store: this.doc,
|
||||
extensions: this.specs,
|
||||
|
||||
@@ -89,7 +89,10 @@ export class PageEditor extends SignalWatcher(
|
||||
changedProperties: Map<string | number | symbol, unknown>
|
||||
) {
|
||||
super.willUpdate(changedProperties);
|
||||
if (changedProperties.has('doc')) {
|
||||
if (
|
||||
this.hasUpdated && // skip the first update
|
||||
changedProperties.has('doc')
|
||||
) {
|
||||
this.std = new BlockStdScope({
|
||||
store: this.doc,
|
||||
extensions: this.specs,
|
||||
|
||||
Reference in New Issue
Block a user