Skip to content

Commit

Permalink
Revert "Add methods return id in callback"
Browse files Browse the repository at this point in the history
This reverts commit dda1a14.
  • Loading branch information
craigbeck committed Oct 23, 2023
1 parent dda1a14 commit e4dc61c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Model/mutators.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@ declare module './Model' {

add(value: any): void;
add(subpath: string, value: any, cb?: ErrorCallback): void;
addPromised(value: any): Promise<string>;
addPromised(subpath: string, value: any): Promise<string>;
_add(segments: Segments, value: any, cb?: (err?: Error, id?: string) => void): void;
addPromised(value: any): Promise<void>;
addPromised(subpath: string, value: any): Promise<void>;
_add(segments: Segments, value: any, cb?: ErrorCallback): void;

del(value: any): void;
del(subpath: string, value: any, cb?: ErrorCallback): void;
Expand Down Expand Up @@ -381,7 +381,7 @@ Model.prototype._add = function(segments, value, cb) {
var event = new ChangeEvent(value, previous, model._pass);
model._emitMutation(segments, event);
}
this._mutate(segments, add, (err) => { cb(err, id) });
this._mutate(segments, add, cb);
return id;
};

Expand Down

0 comments on commit e4dc61c

Please sign in to comment.