mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-15 05:37:32 +00:00
refactor(editor): set readonly (#9475)
This commit is contained in:
@@ -668,7 +668,7 @@ export class StarterDebugMenu extends ShadowlessElement {
|
||||
|
||||
private _toggleReadonly() {
|
||||
const doc = this.doc;
|
||||
doc.awarenessStore.setReadonly(doc.blockCollection, !doc.readonly);
|
||||
doc.readonly = !doc.readonly;
|
||||
}
|
||||
|
||||
private async _toggleStyleDebugMenu() {
|
||||
|
||||
@@ -22,7 +22,6 @@ export function getDocFromUrlParams(collection: DocCollection, url: URL) {
|
||||
doc.load();
|
||||
doc.resetHistory();
|
||||
|
||||
assertExists(doc.ready, 'Doc is not ready');
|
||||
assertExists(doc.root, 'Doc root is not ready');
|
||||
|
||||
return doc;
|
||||
|
||||
Reference in New Issue
Block a user