(cb, err)
| 90 | }); |
| 91 | }; |
| 92 | var saveError = function (cb, err) { |
| 93 | instance_saving = false; |
| 94 | |
| 95 | emitEvent("save", err, instance); |
| 96 | |
| 97 | Hook.trigger(instance, opts.hooks.afterSave, false); |
| 98 | |
| 99 | if (typeof cb === "function") { |
| 100 | cb(err, instance); |
| 101 | } |
| 102 | }; |
| 103 | var saveInstance = function (saveOptions, cb) { |
| 104 | // what this condition means: |
| 105 | // - If the instance is in state mode |
no test coverage detected