knockout/knockout — pull request #1054 by mbest (2013-09-13 22:20:08+00:00)
Title: Initialization of observableArray with Null in 2.3.0/3.0 is not backward compatible with 2.2.1 and lower

I think this change probably falls under the release note "Observable arrays have better handling of unexpected parameters (for example, when initialized with non-array values)", but here's the issue

The old code:
```javascript
ko.observableArray = function (initialValues) {
if (arguments.length == 0) {
// Zero-parameter constructor initializes to empty array
initialValues = [];
}
//...code removed
var result = ko.observable(initialValues);
//...code removed
```
Will allow the observableArray to initialize to Null whereas the new code:

```javascript
ko.observableArray = function (initialValues) {
initialValues = initialValues || [];
//...code removed
var result = ko.observable(initialValues);
//...code removed
```

The problem as I see it is this:
```javascript
var x = ko.observableArray(null);
//x == []
x(null);
//x == null
```
Since null is falsy, when x is initialized, it is set to empty array in 2.3/3.0.
If x is set to null after initialization, it returns null until it reset since it is just an observable under the hood.

We implemented a workaround in our application, but we had valid circumstances where the observable array would be initialized with or reset to null and then tested for such.

I would consider the inconsistency in behavior between the init and setter to be a bug in 2.3/3.0.