Fix #2953. Method calls on splice endpoints

This commit is contained in:
Michal Srb
2013-04-23 05:42:37 +02:00
parent fd61476106
commit e7ebdce60f
3 changed files with 12 additions and 2 deletions

View File

@@ -1746,7 +1746,7 @@
fromDecl = fromRef = '0';
}
if (to) {
if ((from != null ? from.isSimpleNumber() : void 0) && to.isSimpleNumber()) {
if (from && from instanceof Value && (from != null ? from.isSimpleNumber() : void 0) && to instanceof Value && to.isSimpleNumber()) {
to = +to.compile(o) - +fromRef;
if (!exclusive) {
to += 1;