Skip to content

Commit 62e9d1c

Browse files
committed
replace hasOwnProperty
1 parent 0c39fd8 commit 62e9d1c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

js/easycoder/Main.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ const EasyCoder = {
3838
console.log(errString);
3939
return;
4040
}
41-
// const compiler = EasyCoder_Compiler;
4241
const {
4342
tokens,
4443
scriptLines
@@ -81,7 +80,7 @@ const EasyCoder = {
8180
},
8281

8382
verifySymbol: function (name) {
84-
return this.symbols.hasOwnProperty(name);
83+
return typeof this.symbols[name] !== `undefined`;
8584
},
8685

8786
encode: function (value) {
@@ -224,10 +223,11 @@ const EasyCoder = {
224223
this.compiler = compiler;
225224
compiler.value = EasyCoder_Value;
226225
compiler.condition = EasyCoder_Condition;
226+
compiler.parent = parent;
227227
compiler.domain = this.domain;
228228
compiler.imports = imports;
229229
compiler.continue = false;
230-
const program = EasyCoder_Compiler.compile(tokens);
230+
const program = compiler.compile(tokens);
231231
// console.log('Program: ' + JSON.stringify(program, null, 2));
232232
this.compiling = false;
233233

0 commit comments

Comments
 (0)