backbone-publication
Advanced tools
Comparing version 1.0.3 to 1.0.4
@@ -178,5 +178,10 @@ import _ from 'underscore'; | ||
if (!_.isEmpty(newAttributes)) { | ||
this.trigger('change', this, newAttributes, options); | ||
} | ||
// If the new attributes were all nested objects, trigger a general `change` event too. | ||
var allObjects = _.every(newAttributes, function (v) { | ||
return _.isObject(v); | ||
}); | ||
// NOTE: Do not rely on this event passing the changed attributes. This does not conform to | ||
// Backbone's `change` event where the new attributes are not passed. | ||
if (allObjects) this.trigger('change', this, newAttributes, options); | ||
} | ||
@@ -183,0 +188,0 @@ |
{ | ||
"name": "backbone-publication", | ||
"version": "1.0.3", | ||
"version": "1.0.4", | ||
"description": "Supports backbone classes backed by `publication-client` reactive queries.", | ||
@@ -5,0 +5,0 @@ "main": "dist/browser/index.js", |
@@ -38,2 +38,3 @@ # backbone-publication | ||
### Changelog | ||
* 1.0.4 - Reverted change on `PublicationModel.set` and added warning instead. | ||
* 1.0.3 - Fixed issue with `PublicationModel.set` not firing `change` event. | ||
@@ -40,0 +41,0 @@ * 1.0.2 - Util function name typo (`isObject` -> `isPlainObject`). |
@@ -88,5 +88,10 @@ import _ from 'underscore'; | ||
if (!_.isEmpty(newAttributes)) { | ||
this.trigger('change', this, newAttributes, options); | ||
} | ||
// If the new attributes were all nested objects, trigger a general `change` event too. | ||
var allObjects = _.every(newAttributes, function(v) { | ||
return _.isObject(v); | ||
}); | ||
// NOTE: Do not rely on this event passing the changed attributes. This does not conform to | ||
// Backbone's `change` event where the new attributes are not passed. | ||
if (allObjects) this.trigger('change', this, newAttributes, options); | ||
} | ||
@@ -93,0 +98,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
29893
670
43
0