WIP per-tab hoisting

This commit is contained in:
zadam
2020-11-23 22:52:48 +01:00
parent 167b6974fe
commit 52b8162d01
16 changed files with 64 additions and 74 deletions

View File

@@ -7,10 +7,8 @@ const eventService = require('./events');
const repository = require('./repository');
const cls = require('../services/cls');
const Note = require('../entities/note');
const NoteRevision = require('../entities/note_revision');
const Branch = require('../entities/branch');
const Attribute = require('../entities/attribute');
const hoistedNoteService = require('../services/hoisted_note');
const protectedSessionService = require('../services/protected_session');
const log = require('../services/log');
const utils = require('../services/utils');
@@ -524,7 +522,7 @@ function deleteBranch(branch, deleteId, taskContext) {
if (branch.branchId === 'root'
|| branch.noteId === 'root'
|| branch.noteId === hoistedNoteService.getHoistedNoteId()) {
|| branch.noteId === cls.getHoistedNoteId()) {
throw new Error("Can't delete root branch/note");
}