Skip to content

Commit 3369b0a

Browse files
committed
Examine 1st char
1 parent 50822d8 commit 3369b0a

File tree

3 files changed

+11
-11
lines changed

3 files changed

+11
-11
lines changed

dist/easycoder-min.js

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/easycoder.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3096,11 +3096,11 @@ const EasyCoder_Core = {
30963096
comparison = program.compare(program, condition.value1, condition.value2);
30973097
return condition.negate ? comparison >= 0 : comparison < 0;
30983098
case `array`:
3099-
test = Array.isArray(program.getValue(condition.value1));
3100-
return condition.negate ? !test : test;
3099+
const isArray = program.getValue(condition.value1)[0] = `[`;
3100+
return condition.negate ? !isArray : isArray;
31013101
case `object`:
3102-
test = typeof program.getValue(condition.value1) === `object`;
3103-
return condition.negate ? !test : test;
3102+
const isObject = program.getValue(condition.value1)[0] = `{`;
3103+
return condition.negate ? !isObject : isObject;
31043104
case `not`:
31053105
return !program.getValue(condition.value);
31063106
case `moduleRunning`:

js/easycoder/Core.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3096,11 +3096,11 @@ const EasyCoder_Core = {
30963096
comparison = program.compare(program, condition.value1, condition.value2);
30973097
return condition.negate ? comparison >= 0 : comparison < 0;
30983098
case `array`:
3099-
test = Array.isArray(program.getValue(condition.value1));
3100-
return condition.negate ? !test : test;
3099+
const isArray = program.getValue(condition.value1)[0] = `[`;
3100+
return condition.negate ? !isArray : isArray;
31013101
case `object`:
3102-
test = typeof program.getValue(condition.value1) === `object`;
3103-
return condition.negate ? !test : test;
3102+
const isObject = program.getValue(condition.value1)[0] = `{`;
3103+
return condition.negate ? !isObject : isObject;
31043104
case `not`:
31053105
return !program.getValue(condition.value);
31063106
case `moduleRunning`:

0 commit comments

Comments
 (0)