Skip to content

Commit ce801b9

Browse files
committed
Add empty array, object to set-constant scriptlet
1 parent 7feef73 commit ce801b9

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

assets/resources/scriptlets.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -831,6 +831,12 @@
831831
cValue = true;
832832
} else if ( cValue === 'null' ) {
833833
cValue = null;
834+
} else if ( cValue === "''" ) {
835+
cValue = '';
836+
} else if ( cValue === '[]' ) {
837+
cValue = [];
838+
} else if ( cValue === '{}' ) {
839+
cValue = {};
834840
} else if ( cValue === 'noopFunc' ) {
835841
cValue = function(){};
836842
} else if ( cValue === 'trueFunc' ) {
@@ -841,8 +847,6 @@
841847
cValue = parseFloat(cValue);
842848
if ( isNaN(cValue) ) { return; }
843849
if ( Math.abs(cValue) > 0x7FFF ) { return; }
844-
} else if ( cValue === "''" ) {
845-
cValue = '';
846850
} else {
847851
return;
848852
}

0 commit comments

Comments
 (0)