diff --git a/bower.json b/bower.json index 160c2948..d9065476 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "aurelia-binding", - "version": "0.6.0", + "version": "0.6.1", "description": "A modern databinding library for JavaScript and HTML.", "license": "MIT", "keywords": [ @@ -17,7 +17,7 @@ "url": "http://github.com/aurelia/binding" }, "dependencies": { - "aurelia-dependency-injection": "^0.7.0", + "aurelia-dependency-injection": "^0.7.1", "aurelia-metadata": "^0.5.0", "aurelia-task-queue": "^0.4.0", "core-js": "zloirock/core-js" diff --git a/config.js b/config.js index 81426277..618c1f57 100644 --- a/config.js +++ b/config.js @@ -16,24 +16,24 @@ System.config({ System.config({ "map": { - "aurelia-dependency-injection": "github:aurelia/dependency-injection@0.7.0", + "aurelia-dependency-injection": "github:aurelia/dependency-injection@0.7.1", "aurelia-metadata": "github:aurelia/metadata@0.5.0", "aurelia-task-queue": "github:aurelia/task-queue@0.4.0", "babel": "npm:babel-core@5.2.2", "babel-runtime": "npm:babel-runtime@5.2.2", - "core-js": "npm:core-js@0.9.5", - "github:aurelia/dependency-injection@0.7.0": { + "core-js": "npm:core-js@0.9.6", + "github:aurelia/dependency-injection@0.7.1": { "aurelia-logging": "github:aurelia/logging@0.4.0", "aurelia-metadata": "github:aurelia/metadata@0.5.0", - "core-js": "npm:core-js@0.9.5" + "core-js": "npm:core-js@0.9.6" }, "github:aurelia/metadata@0.5.0": { - "core-js": "npm:core-js@0.9.5" + "core-js": "npm:core-js@0.9.6" }, "github:jspm/nodelibs-process@0.1.1": { "process": "npm:process@0.10.1" }, - "npm:core-js@0.9.5": { + "npm:core-js@0.9.6": { "process": "github:jspm/nodelibs-process@0.1.1" } } diff --git a/dist/amd/property-observation.js b/dist/amd/property-observation.js index 9116ccc0..4feb5fa4 100644 --- a/dist/amd/property-observation.js +++ b/dist/amd/property-observation.js @@ -138,18 +138,19 @@ define(['exports', 'core-js'], function (exports, _coreJs) { OoObjectObserver.prototype.handleChanges = function handleChanges(changeRecords) { var updates = {}, observers = this.observers, - i = changeRecords.length; + change, + observer; - while (i--) { - var change = changeRecords[i], - name = change.name; - - if (!(name in updates)) { - var observer = observers[name]; - updates[name] = true; - if (observer) { - observer.trigger(change.object[name], change.oldValue); - } + for (var i = 0, ii = changeRecords.length; i < ii; ++i) { + change = changeRecords[i]; + updates[change.name] = change; + } + + for (var key in updates) { + observer = observers[key], change = updates[key]; + + if (observer) { + observer.trigger(change.object[key], change.oldValue); } } }; diff --git a/dist/commonjs/property-observation.js b/dist/commonjs/property-observation.js index 9ec893d2..4b733905 100644 --- a/dist/commonjs/property-observation.js +++ b/dist/commonjs/property-observation.js @@ -139,18 +139,19 @@ var OoObjectObserver = (function () { OoObjectObserver.prototype.handleChanges = function handleChanges(changeRecords) { var updates = {}, observers = this.observers, - i = changeRecords.length; + change, + observer; - while (i--) { - var change = changeRecords[i], - name = change.name; - - if (!(name in updates)) { - var observer = observers[name]; - updates[name] = true; - if (observer) { - observer.trigger(change.object[name], change.oldValue); - } + for (var i = 0, ii = changeRecords.length; i < ii; ++i) { + change = changeRecords[i]; + updates[change.name] = change; + } + + for (var key in updates) { + observer = observers[key], change = updates[key]; + + if (observer) { + observer.trigger(change.object[key], change.oldValue); } } }; diff --git a/dist/es6/property-observation.js b/dist/es6/property-observation.js index 7bb8779b..868425c1 100644 --- a/dist/es6/property-observation.js +++ b/dist/es6/property-observation.js @@ -117,18 +117,19 @@ export class OoObjectObserver { handleChanges(changeRecords){ var updates = {}, observers = this.observers, - i = changeRecords.length; + change, observer; - while(i--) { - var change = changeRecords[i], - name = change.name; - - if(!(name in updates)){ - var observer = observers[name]; - updates[name] = true; - if(observer){ - observer.trigger(change.object[name], change.oldValue); - } + for(var i = 0, ii = changeRecords.length; i < ii; ++i){ + change = changeRecords[i]; + updates[change.name] = change; + } + + for(var key in updates){ + observer = observers[key], + change = updates[key]; + + if(observer){ + observer.trigger(change.object[key], change.oldValue); } } } diff --git a/dist/system/property-observation.js b/dist/system/property-observation.js index 66fafd40..d70417c5 100644 --- a/dist/system/property-observation.js +++ b/dist/system/property-observation.js @@ -139,18 +139,19 @@ System.register(['core-js'], function (_export) { OoObjectObserver.prototype.handleChanges = function handleChanges(changeRecords) { var updates = {}, observers = this.observers, - i = changeRecords.length; + change, + observer; - while (i--) { - var change = changeRecords[i], - name = change.name; - - if (!(name in updates)) { - var observer = observers[name]; - updates[name] = true; - if (observer) { - observer.trigger(change.object[name], change.oldValue); - } + for (var i = 0, ii = changeRecords.length; i < ii; ++i) { + change = changeRecords[i]; + updates[change.name] = change; + } + + for (var key in updates) { + observer = observers[key], change = updates[key]; + + if (observer) { + observer.trigger(change.object[key], change.oldValue); } } }; diff --git a/doc/CHANGELOG.md b/doc/CHANGELOG.md index 61b7d9c5..ea94cbda 100644 --- a/doc/CHANGELOG.md +++ b/doc/CHANGELOG.md @@ -1,3 +1,11 @@ +### 0.6.1 (2015-05-06) + + +#### Bug Fixes + +* **property-observation:** better update when in OO mode ([2d8ad7d5](http://github.com/aurelia/binding/commit/2d8ad7d57a543b35be6f6cc5b4792f10e5a5ab30)) + + ## 0.6.0 (2015-04-30) diff --git a/package.json b/package.json index c603517f..485ce466 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "aurelia-binding", - "version": "0.6.0", + "version": "0.6.1", "description": "A modern databinding library for JavaScript and HTML.", "keywords": [ "aurelia", @@ -25,7 +25,7 @@ "lib": "dist/system" }, "dependencies": { - "aurelia-dependency-injection": "github:aurelia/dependency-injection@^0.7.0", + "aurelia-dependency-injection": "github:aurelia/dependency-injection@^0.7.1", "aurelia-metadata": "github:aurelia/metadata@^0.5.0", "aurelia-task-queue": "github:aurelia/task-queue@^0.4.0", "core-js": "npm:core-js@^0.9.5"