editor: fix regression in code editor making global variables unrecognized
This commit is contained in:
parent
5785a5e026
commit
9abfb85739
1 changed files with 4 additions and 3 deletions
|
|
@ -207,9 +207,7 @@ class CodeEditor {
|
|||
|
||||
if (this.language === 'javascript') {
|
||||
let globals = {}
|
||||
for (var k in scriptGlobals) {
|
||||
globals[k] = true
|
||||
}
|
||||
|
||||
if (this.name === 'onKeyboard') {
|
||||
globals = {type: true, key: true, code: true, ctrl: true, shift: true, alt: true, meta: true}
|
||||
} else if (this.name === 'onCreate') {
|
||||
|
|
@ -226,6 +224,9 @@ class CodeEditor {
|
|||
globals = {value: true, height: true, width: true, cssVars: true}
|
||||
}
|
||||
|
||||
for (var k in scriptGlobals) {
|
||||
globals[k] = true
|
||||
}
|
||||
|
||||
globals.locals = true
|
||||
globals.console = true
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue