@harperfast/rocksdb-js 0.1.13 → 0.1.14

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/dist/index.cjs CHANGED
@@ -1801,11 +1801,13 @@ Object.defineProperty(TransactionLog.prototype, "query", { value({ start, end, e
1801
1801
  size = logBuffer.size ?? (logBuffer.size = transactionLog.getLogFileSize(logBuffer.logId));
1802
1802
  if (position >= size) {
1803
1803
  const nextLogBuffer = getLogMemoryMap(transactionLog, logBuffer.logId + 1);
1804
- dataView = nextLogBuffer.dataView;
1805
- logBuffer = nextLogBuffer;
1806
- if (latestLogId > logBuffer.logId) size = logBuffer.size ?? (logBuffer.size = transactionLog.getLogFileSize(logBuffer.logId));
1807
- else size = latestSize;
1808
- position = TRANSACTION_LOG_FILE_HEADER_SIZE;
1804
+ if (nextLogBuffer) {
1805
+ dataView = nextLogBuffer.dataView;
1806
+ logBuffer = nextLogBuffer;
1807
+ if (latestLogId > logBuffer.logId) size = logBuffer.size ?? (logBuffer.size = transactionLog.getLogFileSize(logBuffer.logId));
1808
+ else size = latestSize;
1809
+ position = TRANSACTION_LOG_FILE_HEADER_SIZE;
1810
+ }
1809
1811
  }
1810
1812
  }
1811
1813
  }
@@ -1908,7 +1910,7 @@ function loadLastPosition(transactionLog, readUncommitted) {
1908
1910
  //#region src/index.ts
1909
1911
  const versions = {
1910
1912
  rocksdb: version,
1911
- "rocksdb-js": "0.1.13"
1913
+ "rocksdb-js": "0.1.14"
1912
1914
  };
1913
1915
 
1914
1916
  //#endregion