Skip to content
This repository has been archived by the owner on Jan 12, 2019. It is now read-only.

fixes issue #56 #77

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/common/libs/queue.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ Queue.prototype = {

handler: function(fn, context) {
this._runOrStore(function() {
fn.apply(context, this.getErrors());
fn.apply(context, this.hasErrors()? this.getErrors() : [null]);
});
return this;
},
Expand Down
4 changes: 2 additions & 2 deletions test/NormalizedCollection/Record.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,7 @@ describe('Record', function() {
expect(spy).not.toHaveBeenCalled();
}
});
expect(spy).toHaveBeenCalledWith();
expect(spy).toHaveBeenCalledWith(null);
});

it('triggers callback with correct context', function() {
Expand All @@ -450,7 +450,7 @@ describe('Record', function() {
_.each(refs, function(ref) {
try { ref.flush(); } catch(e) {}
});
expect(spy).toHaveBeenCalledWith();
expect(spy).toHaveBeenCalledWith(null);
});

it('returns an error if any path returns an error', function() {
Expand Down