runOnNoteChange fires also on the frontend, closes #340

This commit is contained in:
azivner
2019-01-16 22:52:32 +01:00
parent 35edce7523
commit 19d8947123
4 changed files with 15 additions and 3 deletions

View File

@@ -54,6 +54,11 @@ async function getRelationBundles(req) {
for (const noteId of uniqueNoteIds) {
const note = await repository.getNote(noteId);
if (!note.isJavaScript() || note.getScriptEnv() !== 'frontend') {
continue;
}
const bundle = await scriptService.getScriptBundleForFrontend(note);
if (bundle) {