@onehat/data 1.8.9 → 1.8.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -285,7 +285,7 @@ class LocalFromRemoteRepository extends EventEmitter {
|
|
|
285
285
|
/**
|
|
286
286
|
* Syncs local and remote repositories, based on operation mode.
|
|
287
287
|
*/
|
|
288
|
-
sync = async (entity) => {
|
|
288
|
+
sync = async (entity, callback = null) => {
|
|
289
289
|
try {
|
|
290
290
|
if (!this.isOnline) {
|
|
291
291
|
this._doAutoSync(true);
|
|
@@ -405,6 +405,9 @@ class LocalFromRemoteRepository extends EventEmitter {
|
|
|
405
405
|
} finally {
|
|
406
406
|
this.isSyncing = false;
|
|
407
407
|
this.emit('endSync', this);
|
|
408
|
+
if (callback) {
|
|
409
|
+
callback();
|
|
410
|
+
}
|
|
408
411
|
}
|
|
409
412
|
|
|
410
413
|
}
|