diff --git a/observe/observe.js b/observe/observe.js index af312044c6b..73629d72785 100644 --- a/observe/observe.js +++ b/observe/observe.js @@ -1029,7 +1029,7 @@ steal('can/util','can/construct', function(can) { this.length = 0; can.cid(this, ".observe") this._init = 1; - this.push.apply(this, instances || []); + this.push.apply(this, can.makeArray(instances || [])); this.bind('change'+this._cid,can.proxy(this._changes,this)); can.extend(this, options); delete this._init; diff --git a/observe/observe_test.js b/observe/observe_test.js index 8185f7bd937..38428696043 100644 --- a/observe/observe_test.js +++ b/observe/observe_test.js @@ -591,4 +591,11 @@ test("replace with a deferred that resolves to an Observe.List", function(){ list.replace(def); }); +test("IE8 error on list setup with Observe.List (#226)", function() { + var list = new can.Observe.List(['first', 'second', 'third']), + otherList = new can.Observe.List(list); + + deepEqual(list.attr(), otherList.attr(), 'Lists are the same'); +}); + })();