mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-02-03 23:00:14 -05:00
Avoided inserting actions if nothing has changed
refs #10431
- I thought i have added this protection, but got removed via the simplification in cca3317a11
This commit is contained in:
parent
b25da62cca
commit
2eb1f2a507
1 changed files with 4 additions and 0 deletions
|
@ -100,6 +100,10 @@ proto = ghostBookshelf.Model.prototype;
|
||||||
* We could embedd adding actions more nicely in the future e.g. plugin.
|
* We could embedd adding actions more nicely in the future e.g. plugin.
|
||||||
*/
|
*/
|
||||||
const addAction = (model, event, options) => {
|
const addAction = (model, event, options) => {
|
||||||
|
if (model._changed && !Object.keys(model._changed).length) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// CASE: model does not support actions at all
|
// CASE: model does not support actions at all
|
||||||
if (!model.getAction) {
|
if (!model.getAction) {
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Add table
Reference in a new issue