diff --git a/chrome/content/zotero/runJS.js b/chrome/content/zotero/runJS.js index a5e666adb5..037c37b147 100644 --- a/chrome/content/zotero/runJS.js +++ b/chrome/content/zotero/runJS.js @@ -44,7 +44,7 @@ function handleInput() { // eslint-disable-line no-unused-vars } var code = codeEditor.getSession().getValue(); // If `await` is used, switch to async mode - if (/[^=([]\s*await\s/m.test(code)) { + if (/(^|[^=([]\s*)await\s/m.test(code)) { checkbox.checked = true; update(); }