mirror of
https://github.com/zadam/trilium.git
synced 2024-09-21 16:16:04 +08: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');
|
||||
|
||||
async function executeNote(note, originEntity) {
|
||||
if (!note.isJavaScript()) {
|
||||
if (!note.isJavaScript() || !note.isContentAvailable) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -80,6 +80,10 @@ function getParams(params) {
|
|||
}
|
||||
|
||||
async function getScriptBundle(note, root = true, scriptEnv = null, includedNoteIds = []) {
|
||||
if (!note.isContentAvailable) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!note.isJavaScript() && !note.isHtml()) {
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue