@ohhwells/bridge 0.1.69-next.207 → 0.1.69-next.208

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
@@ -8253,10 +8253,11 @@ function applyPersistedOrder(entries) {
8253
8253
  if (bOrder === void 0) return -1;
8254
8254
  return aOrder - bOrder;
8255
8255
  });
8256
- const parent = sections[0].parentElement;
8257
- if (!parent) return;
8258
- const anchor = sections[sections.length - 1].nextSibling;
8259
- ordered.forEach((el) => parent.insertBefore(el, anchor));
8256
+ let prev = null;
8257
+ for (const el of ordered) {
8258
+ if (prev) prev.after(el);
8259
+ prev = el;
8260
+ }
8260
8261
  }
8261
8262
  function getPageSectionOrderEntries(raw, currentPath) {
8262
8263
  if (!raw) return [];