mirror of
https://github.com/zadam/trilium.git
synced 2025-06-06 18:08:33 +02:00
don't attempt to run protected notes outside of protected session, fixes #279
This commit is contained in:
parent
8e8fd88857
commit
012ba9e060
@ -6,7 +6,7 @@ const sourceIdService = require('./source_id');
|
|||||||
const log = require('./log');
|
const log = require('./log');
|
||||||
|
|
||||||
async function executeNote(note, originEntity) {
|
async function executeNote(note, originEntity) {
|
||||||
if (!note.isJavaScript()) {
|
if (!note.isJavaScript() || !note.isContentAvailable) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -80,6 +80,10 @@ function getParams(params) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async function getScriptBundle(note, root = true, scriptEnv = null, includedNoteIds = []) {
|
async function getScriptBundle(note, root = true, scriptEnv = null, includedNoteIds = []) {
|
||||||
|
if (!note.isContentAvailable) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (!note.isJavaScript() && !note.isHtml()) {
|
if (!note.isJavaScript() && !note.isHtml()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user