Merge pull request #295 from doyousketch2/ListPrims

Update ListPrims.as
This commit is contained in:
Nathan Dinsmore 2014-06-22 14:01:27 -04:00
commit fc957ccd01

View file

@ -153,7 +153,7 @@ public class ListPrims {
var item:* = interp.arg(b, 1); var item:* = interp.arg(b, 1);
if (list.contents.indexOf(item) >= 0) return true; if (list.contents.indexOf(item) >= 0) return true;
for each (var el:* in list.contents) { for each (var el:* in list.contents) {
// use Scratch comparision operator (Scratch considers the string '123' equal to the number 123) // use Scratch comparison operator (Scratch considers the string '123' equal to the number 123)
if (Primitives.compare(el, item) == 0) return true; if (Primitives.compare(el, item) == 0) return true;
} }
return false; return false;