small fixes

This commit is contained in:
zadam
2022-12-23 15:07:48 +01:00
parent 698eb53006
commit 0441e7396a
13 changed files with 58 additions and 38 deletions

View File

@@ -9,6 +9,7 @@ const protectedSessionService = require('./protected_session');
const cls = require("./cls");
const searchService = require('../services/search/services/search');
const SearchContext = require('../services/search/search_context');
const hoistedNoteService = require("./hoisted_note");
const CALENDAR_ROOT_LABEL = 'calendarRoot';
const YEAR_LABEL = 'yearNote';
@@ -32,7 +33,9 @@ function createNote(parentNote, noteTitle) {
function getRootCalendarNote() {
let rootNote;
if (cls.getHoistedNoteId() !== 'root') {
const workspaceNote = hoistedNoteService.getWorkspaceNote();
if (!workspaceNote.isRoot()) {
rootNote = searchService.findFirstNoteWithQuery('#workspaceCalendarRoot', new SearchContext({ignoreHoistedNote: false}));
}