Permalink
Browse files

Do better detection of lists.

* Draw env clobbers prototype chain by using jquery extend to dupe env it is passed before modifying it.  instanceof on isla List does not work on a list that is part of a duped env.
  • Loading branch information...
maryrosecook committed Dec 27, 2012
1 parent c557f7f commit 451ad488d8f98a57c408b8977f46c898d3c9f8cd
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/interpreter.js
View
@@ -202,7 +202,7 @@
var resolve = multimethod()
.dispatch(function(thing) {
- if(thing instanceof Isla.Library.List) {
+ if(thing._meta && thing._meta.type === "list") {
return "list";
} else if(Isla.Utils.type(thing) === "Object") {
return thing.ref === undefined ? "object" : "ref";

0 comments on commit 451ad48

Please sign in to comment.