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>
|
changedProperties: Map<string | number | symbol, unknown>
|
||||||
) {
|
) {
|
||||||
super.willUpdate(changedProperties);
|
super.willUpdate(changedProperties);
|
||||||
if (changedProperties.has('doc')) {
|
if (
|
||||||
|
this.hasUpdated && // skip the first update
|
||||||
|
changedProperties.has('doc')
|
||||||
|
) {
|
||||||
this.std = new BlockStdScope({
|
this.std = new BlockStdScope({
|
||||||
store: this.doc,
|
store: this.doc,
|
||||||
extensions: this.specs,
|
extensions: this.specs,
|
||||||
|
|||||||
@@ -89,7 +89,10 @@ export class PageEditor extends SignalWatcher(
|
|||||||
changedProperties: Map<string | number | symbol, unknown>
|
changedProperties: Map<string | number | symbol, unknown>
|
||||||
) {
|
) {
|
||||||
super.willUpdate(changedProperties);
|
super.willUpdate(changedProperties);
|
||||||
if (changedProperties.has('doc')) {
|
if (
|
||||||
|
this.hasUpdated && // skip the first update
|
||||||
|
changedProperties.has('doc')
|
||||||
|
) {
|
||||||
this.std = new BlockStdScope({
|
this.std = new BlockStdScope({
|
||||||
store: this.doc,
|
store: this.doc,
|
||||||
extensions: this.specs,
|
extensions: this.specs,
|
||||||
|
|||||||
Reference in New Issue
Block a user