Skip to content

Commit

Permalink
Merge pull request #145 from Kanaye/collection-fix
Browse files Browse the repository at this point in the history
Reverted one change from #143 that broke collections.
  • Loading branch information
astoilkov committed May 28, 2016
2 parents dddbd0a + 703f0d7 commit 2ecd567
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/mvc/Model.js
Original file line number Diff line number Diff line change
Expand Up @@ -284,11 +284,12 @@ define([

_setPropertyValue: function (property, propertyValue) {
var propertyName = property.propertyName;
if (property.isObservable) {
this[propertyName] = this._createObservable(property, propertyValue);
} else if (blocks.isFunction(this[propertyName])) {

if (blocks.isFunction(this[propertyName])) {
this[propertyName](propertyValue);
this._dataSource.update(this.dataItem());
} else if (property.isObservable) {
this[propertyName] = this._createObservable(property, propertyValue);
} else {
this[propertyName] = function () {
return propertyValue;
Expand Down

0 comments on commit 2ecd567

Please sign in to comment.