From f0dc53f53f4c2fdf90a2701df73f73b6c2f06395 Mon Sep 17 00:00:00 2001 From: synix Date: Thu, 25 Apr 2024 11:17:49 +0800 Subject: [PATCH] fix minor typos --- src/utils/Transaction.js | 2 +- src/utils/encoding.js | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/utils/Transaction.js b/src/utils/Transaction.js index 829589ec..9792d32e 100644 --- a/src/utils/Transaction.js +++ b/src/utils/Transaction.js @@ -225,7 +225,7 @@ const tryGcDeleteSet = (ds, store, gcFilter) => { */ const tryMergeDeleteSet = (ds, store) => { // try to merge deleted / gc'd items - // merge from right to left for better efficiecy and so we don't miss any merge targets + // merge from right to left for better efficiency and so we don't miss any merge targets ds.clients.forEach((deleteItems, client) => { const structs = /** @type {Array} */ (store.clients.get(client)) for (let di = deleteItems.length - 1; di >= 0; di--) { diff --git a/src/utils/encoding.js b/src/utils/encoding.js index 2277a140..08a9602d 100644 --- a/src/utils/encoding.js +++ b/src/utils/encoding.js @@ -154,7 +154,7 @@ export const readClientsStructRefs = (decoder, doc) => { // @type {string|null} const struct = new Item( createID(client, clock), - null, // leftd + null, // left (info & binary.BIT8) === binary.BIT8 ? decoder.readLeftID() : null, // origin null, // right (info & binary.BIT7) === binary.BIT7 ? decoder.readRightID() : null, // right origin @@ -178,7 +178,7 @@ export const readClientsStructRefs = (decoder, doc) => { const struct = new Item( createID(client, clock), - null, // leftd + null, // left origin, // origin null, // right rightOrigin, // right origin @@ -370,7 +370,7 @@ export const writeStructsFromTransaction = (encoder, transaction) => writeClient /** * Read and apply a document update. * - * This function has the same effect as `applyUpdate` but accepts an decoder. + * This function has the same effect as `applyUpdate` but accepts a decoder. * * @param {decoding.Decoder} decoder * @param {Doc} ydoc @@ -451,7 +451,7 @@ export const readUpdateV2 = (decoder, ydoc, transactionOrigin, structDecoder = n /** * Read and apply a document update. * - * This function has the same effect as `applyUpdate` but accepts an decoder. + * This function has the same effect as `applyUpdate` but accepts a decoder. * * @param {decoding.Decoder} decoder * @param {Doc} ydoc