Skip to content

Commit dedf579

Browse files
committed
Passing along error through the callback (it will always be null for this method)
1 parent f06960f commit dedf579

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

src/simperium/bucket.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ Bucket.prototype.update = function( id, data, options, callback ) {
3232
};
3333

3434
Bucket.prototype.hasLocalChanges = function( callback ) {
35-
callback( false );
35+
callback( null, false );
3636
};
3737

3838
Bucket.prototype.getVersion = function( id, callback ) {

src/simperium/channel.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,7 @@ export default function Channel( appid, access_token, bucket, store ) {
294294
};
295295

296296
bucket.hasLocalChanges = function( callback ) {
297-
callback( channel.localQueue.hasChanges() );
297+
callback( null, channel.localQueue.hasChanges() );
298298
};
299299

300300
bucket.getVersion = function( id, callback ) {

test/simperium/channel_test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,7 @@ describe( 'Channel', function() {
312312

313313
it( 'should have local changes on send', function( done ) {
314314
channel.once( 'send', function() {
315-
bucket.hasLocalChanges( hasChanges => {
315+
bucket.hasLocalChanges( ( error, hasChanges ) => {
316316
assert.equal( hasChanges, true );
317317
done();
318318
} );

0 commit comments

Comments
 (0)