From 03003728ff2b300031bc58bc9e9ddc7ed94b7e22 Mon Sep 17 00:00:00 2001 From: shamb0t Date: Wed, 27 Nov 2019 12:04:22 +0000 Subject: [PATCH] add pin option --- src/Store.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Store.js b/src/Store.js index ac0ca82..e6539cc 100644 --- a/src/Store.js +++ b/src/Store.js @@ -469,14 +469,14 @@ class Store { } } - async _addOperation (data, { onProgressCallback } = {}) { + async _addOperation (data, { onProgressCallback, pin = false } = {}) { if (this._oplog) { // check local cache? if (this.options.syncLocal) { await this.syncLocal() } - const entry = await this._oplog.append(data, this.options.referenceCount) + const entry = await this._oplog.append(data, this.options.referenceCount, pin) this._recalculateReplicationStatus(this.replicationStatus.progress + 1, entry.clock.time) await this._cache.set(this.localHeadsPath, [entry]) await this._updateIndex()