mirror of
				https://github.com/zadam/trilium.git
				synced 2025-10-31 10:26:08 +01:00 
			
		
		
		
	don't attempt to run protected notes outside of protected session, fixes #279
This commit is contained in:
		| @@ -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; | ||||||
|     } |     } | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user