diff options
author | (quasar) nebula <qznebula@protonmail.com> | 2025-02-12 07:34:12 -0400 |
---|---|---|
committer | (quasar) nebula <qznebula@protonmail.com> | 2025-02-12 07:44:00 -0400 |
commit | 1f7da6f472a2bd12bd899f590e039972debeee7c (patch) | |
tree | 8727811560ffe0f7568f118a639be6be192e1749 /src | |
parent | c45d45759395725128c030ac387bb20b80aada1e (diff) |
data: HomepageLayout: notice missing section before rows
Diffstat (limited to 'src')
-rw-r--r-- | src/data/things/homepage-layout.js | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/data/things/homepage-layout.js b/src/data/things/homepage-layout.js index 45059370..812c0b30 100644 --- a/src/data/things/homepage-layout.js +++ b/src/data/things/homepage-layout.js @@ -126,7 +126,11 @@ export class HomepageLayout extends Thing { closeCurrentSection(); currentSection = entry; } else if (entry instanceof HomepageLayoutRow) { - currentSectionRows.push(entry); + if (currentSection) { + currentSectionRows.push(entry); + } else { + throw new Error(`Expected a 'Section' document to add following rows into`); + } } } |