@bitcobblers/wod-wiki-storage 0.59.2246 → 0.60.2250

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.
@@ -1,6 +1,6 @@
1
1
  import { collectUserScopeContext, isUserOwnedRow, USER_DELETED_SEED_PREFIX } from '../chunk-AK7366MO.mjs';
2
- import { readLegacyRows, readRawSyncOps } from '../chunk-57JHRZPS.mjs';
3
- import { STORE_DEFS, DB_VERSION, stampUserOwned, validateStoredPins, validateStorageRow, rowsEqual, USER_OWNED_STORES, keyFromValue, validateNoteWrite, validateSessionWrite } from '../chunk-325UJL7V.mjs';
2
+ import { readLegacyRows, readRawSyncOps } from '../chunk-6WNKSMMW.mjs';
3
+ import { STORE_DEFS, DB_VERSION, stampUserOwned, validateStoredPins, validateStorageRow, rowsEqual, USER_OWNED_STORES, keyFromValue, validateNoteWrite, validateSessionWrite } from '../chunk-W4J74CHN.mjs';
4
4
  import '../chunk-XRQKLSOT.mjs';
5
5
  import { openDB } from 'idb';
6
6
  import { parseDocumentSections, KNOWN_SECTION_WIDGETS, actionableSectionKind, matchDialectFence } from '@bitcobblers/wod-wiki-core';
package/dist/index.cjs CHANGED
@@ -514,7 +514,7 @@ async function validateStoredPins(notes, sessions, getRevisions) {
514
514
  let i = 0;
515
515
  for (const note of notes) for (const block of Object.values(note.blocks)) {
516
516
  const revision = revisions[i++];
517
- if (!revision || revision.kind !== block.kind || revision.rawContent !== note.rawContent.slice(block.from, block.to) || revision.dialect !== block.dialect || revision.sport !== block.sport) throw new StorageError(409, "Note block has no matching immutable revision", "invalid_note_blocks");
517
+ if (revision && (revision.kind !== block.kind || revision.rawContent !== note.rawContent.slice(block.from, block.to) || revision.dialect !== block.dialect || revision.sport !== block.sport)) throw new StorageError(409, "Note block has no matching immutable revision", "invalid_note_blocks");
518
518
  }
519
519
  for (let sessionIndex = 0; sessionIndex < sessions.length; sessionIndex++) {
520
520
  const revision = revisions[i++];