react-iiif-vault 0.9.19 → 0.9.20

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.
@@ -408,14 +408,18 @@ function getManifestSequence(vault, manifestOrRange, { disablePaging } = {}) {
408
408
  currentOrdering = [];
409
409
  }
410
410
  };
411
+ let offset = 0;
411
412
  for (let i = 0; i < manifestItems.length; i++) {
412
413
  const canvas = vault.get(manifestItems[i]);
413
- if (i === 0 || canvas.behavior.includes("facing-pages")) {
414
- flush();
415
- ordering.push([i]);
414
+ if (canvas.behavior.includes("non-paged")) {
415
+ if (i === offset) {
416
+ offset++;
417
+ }
416
418
  continue;
417
419
  }
418
- if (canvas.behavior.includes("non-paged")) {
420
+ if (i === offset || canvas.behavior.includes("facing-pages")) {
421
+ flush();
422
+ ordering.push([i]);
419
423
  continue;
420
424
  }
421
425
  currentOrdering.push(i);