From 5a29be856dd29905e36b9c0002dea85d2368656f Mon Sep 17 00:00:00 2001 From: thecodrr Date: Thu, 2 Apr 2020 15:35:54 +0500 Subject: [PATCH] fix: complete editor default session --- apps/web/src/stores/editor-store.js | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/apps/web/src/stores/editor-store.js b/apps/web/src/stores/editor-store.js index bbf5f436f..9b43cac8c 100644 --- a/apps/web/src/stores/editor-store.js +++ b/apps/web/src/stores/editor-store.js @@ -8,13 +8,24 @@ import Vault from "../common/vault.js"; const SESSION_STATES = { stale: "stale", new: "new" }; const DEFAULT_SESSION = { - id: 0, - timeout: undefined, + notebook: undefined, state: SESSION_STATES.new, + isSaving: false, title: "", - content: { delta: { ops: [] }, text: "" }, + timeout: 0, + id: "", + pinned: false, + favorite: false, + locked: false, tags: [], - colors: [] + colors: [], + dateEdited: 0, + content: { + text: "", + delta: { + ops: [] + } + } }; class EditorStore extends BaseStore { session = DEFAULT_SESSION;