0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-01-06 22:40:14 -05:00

Made use of model.wasChanged

refs #10461
This commit is contained in:
kirrg001 2019-02-07 22:06:13 +01:00
parent a157c147af
commit 4fca28e643

View file

@ -100,7 +100,7 @@ proto = ghostBookshelf.Model.prototype;
* We could embedd adding actions more nicely in the future e.g. plugin.
*/
const addAction = (model, event, options) => {
if (model._changed && !Object.keys(model._changed).length) {
if (!model.wasChanged()) {
return;
}
@ -175,7 +175,7 @@ ghostBookshelf.Model = ghostBookshelf.Model.extend({
debug(model.tableName, event);
const _emit = (ghostEvent, model) => {
if (model._changed && !Object.keys(model._changed).length) {
if (!model.wasChanged()) {
return;
}