Handle this references properly in track id mode

This commit is contained in:
kpdecker
2015-08-03 12:13:24 -05:00
parent 0aa54f49de
commit 9f265b9761
2 changed files with 7 additions and 4 deletions
+3 -2
View File
@@ -390,8 +390,9 @@ Compiler.prototype = {
value = val.original || value;
if (value.replace) {
value = value
.replace(/^\.\//g, '')
.replace(/^\.$/g, '');
.replace(/^this(?:\.|$)/, '')
.replace(/^\.\//, '')
.replace(/^\.$/, '');
}
this.opcode('pushId', val.type, value);