From 075302b8fda5be77d6e09ed6b409ef0bd92030aa Mon Sep 17 00:00:00 2001 From: kpal Date: Thu, 5 Sep 2024 11:38:24 +0100 Subject: [PATCH] added callback to submitOp on asset --- src/realtime/asset.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/realtime/asset.js b/src/realtime/asset.js index f532bdd..efdeff2 100644 --- a/src/realtime/asset.js +++ b/src/realtime/asset.js @@ -64,12 +64,13 @@ class RealtimeAsset extends Events { * Submits sharedb operation * * @param {object} op - The operation + * @param {function} [callback] - The callback */ - submitOp(op) { + submitOp(op, callback) { if (!this._loaded) return; try { - this._document.submitOp([op]); + this._document.submitOp([op], callback); } catch (err) { console.error(err); this._realtime.emit('error:asset', err, this._uniqueId);