Skip to content

Commit

Permalink
Fix problem with observable generics for Array
Browse files Browse the repository at this point in the history
  • Loading branch information
kriskowal committed Sep 23, 2012
1 parent 0627b28 commit 97562fe
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion CHANGES.md
@@ -1,5 +1,5 @@


## v0.0.4 ## v0.0.5


- The `observable-array` and `observable-object` modules have been - The `observable-array` and `observable-object` modules have been
moved to the Functional Reactive Bindings (`frb`) package as `array` moved to the Functional Reactive Bindings (`frb`) package as `array`
Expand Down
5 changes: 5 additions & 0 deletions observable.js
Expand Up @@ -18,6 +18,11 @@ Observable.getContentChangeDescriptor = function () {
}; };


Observable.addContentChangeListener = function (listener, beforeChange) { Observable.addContentChangeListener = function (listener, beforeChange) {
// a concession for objects like Array that are not inherently observable
if (!this.isObservable) {
this.makeObservable();
}

var descriptor = this.getContentChangeDescriptor(); var descriptor = this.getContentChangeDescriptor();


var listeners; var listeners;
Expand Down
2 changes: 1 addition & 1 deletion package.json
@@ -1,6 +1,6 @@
{ {
"name": "collections", "name": "collections",
"version": "0.0.4", "version": "0.0.5",
"description": "data structures with idiomatic JavaScript collection interfaces", "description": "data structures with idiomatic JavaScript collection interfaces",
"homepage": "http://github.com/kriskowal/collections", "homepage": "http://github.com/kriskowal/collections",
"author": "Kris Kowal <kris@cixar.com> (http://github.com/kriskowal/collections)", "author": "Kris Kowal <kris@cixar.com> (http://github.com/kriskowal/collections)",
Expand Down

0 comments on commit 97562fe

Please sign in to comment.