Permalink
Browse files

Merge pull request #99 from GLuKKi/patch-1

Fixed lost Error object (Thanks, GLuKKi!)
  • Loading branch information...
2 parents 700f6a9 + 8892862 commit 9e8e5d05850b7451245278e92f4c9d3025f3e692 @SteveSanderson SteveSanderson committed May 12, 2011
Showing with 1 addition and 2 deletions.
  1. +1 −2 src/subscribables/observableArray.js
View
3 src/subscribables/observableArray.js
@@ -1,11 +1,10 @@
-
ko.observableArray = function (initialValues) {
if (arguments.length == 0) {
// Zero-parameter constructor initializes to empty array
initialValues = [];
}
if ((initialValues !== null) && (initialValues !== undefined) && !('length' in initialValues))
- throw new "The argument passed when initializing an observable array must be an array, or null, or undefined.";
+ throw new Error("The argument passed when initializing an observable array must be an array, or null, or undefined.");
var result = new ko.observable(initialValues);
ko.utils.arrayForEach(["pop", "push", "reverse", "shift", "sort", "splice", "unshift"], function (methodName) {

0 comments on commit 9e8e5d0

Please sign in to comment.