refactor: update SNJS + eslint

This commit is contained in:
Baptiste Grob
2021-01-18 13:06:01 +01:00
parent f7f3b062fb
commit 27a68accdd
12 changed files with 272 additions and 384 deletions

View File

@@ -1,13 +1,10 @@
import { isDesktopApplication, isDev } from '@/utils';
import pull from 'lodash/pull';
import {
ProtectedAction,
ApplicationEvent,
SNTag,
SNNote,
SNUserPrefs,
ContentType,
SNSmartTag,
PayloadSource,
DeinitSource,
UuidString,
@@ -231,8 +228,7 @@ export class AppState {
return;
};
const approved = this.application.authorizeNoteAccess(note);
if (approved === true || await approved) {
if (await this.application.authorizeNoteAccess(note)) {
const activeEditor = this.getActiveEditor();
if (!activeEditor) {
this.application.editorGroup.createEditor(noteUuid);