Skip to content

Commit

Permalink
shortid
Browse files Browse the repository at this point in the history
  • Loading branch information
pandrr committed Jan 29, 2025
1 parent 1750eae commit 00c592d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/core/core_patch.js
Original file line number Diff line number Diff line change
Expand Up @@ -1390,7 +1390,7 @@ Patch.replaceOpIds = function (json, options)
if (outerOp)
{
op.storage = op.storage || {};
op.storage.ref = op.storage.ref || CABLES.shortId();
op.storage.ref = op.storage.ref || shortId();
links[l].refOp = op.storage.ref;
links[l].subOpRef = outerOp.storage.ref;
}
Expand All @@ -1407,7 +1407,7 @@ Patch.replaceOpIds = function (json, options)
{
const op = json.ops[i];
const oldId = op.id;
let newId = CABLES.shortId();
let newId = shortId();

if (options.prefixHash) newId = prefixedHash(options.prefixHash + oldId);

Expand All @@ -1422,7 +1422,7 @@ Patch.replaceOpIds = function (json, options)
else
{
op.storage = op.storage || {};
op.storage.ref = newId = CABLES.shortId();
op.storage.ref = newId = shortId();
}
}

Expand Down

0 comments on commit 00c592d

Please sign in to comment.