Skip to content

Commit 51a737b

Browse files
authored
Merge pull request #51 from Simperium/fix/indexing-bucket-complete
Set bucket isIndexing property as soon as indexing finishes
2 parents 1622ade + dbd2913 commit 51a737b

2 files changed

Lines changed: 6 additions & 2 deletions

File tree

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "simperium",
3-
"version": "0.2.6",
3+
"version": "0.2.7",
44
"description": "A simperium client for node.js",
55
"main": "./lib/simperium/index.js",
66
"repository": {

src/simperium/channel.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -399,6 +399,11 @@ Channel.prototype.onIndex = function( data ) {
399399
cv = page.current,
400400
update = internal.updateObjectVersion.bind( this );
401401

402+
if ( !mark ) {
403+
// Let the bucket know straight away that indexing has finished
404+
this.bucket.isIndexing = false;
405+
}
406+
402407
var objectId;
403408
objects.forEach( function( object ) {
404409
objectId = object.id;
@@ -674,4 +679,3 @@ function collectionRevisions( channel, id, callback ) {
674679
callback( e );
675680
} );
676681
}
677-

0 commit comments

Comments
 (0)