fix: cleanup temp code

This commit is contained in:
Benjamin Singleton 2025-06-14 12:46:37 -05:00
parent 6ea53dc652
commit d35ca7f3ba
4 changed files with 6 additions and 46 deletions

View file

@ -5,7 +5,7 @@ export function localizeLayout<T>(
layout: DeepReadonly<Layout<T>>,
): T[keyof T][] {
const sections: T[keyof T][] = [];
for (const sectionId of layout.layout) {
for (const sectionId of layout.layout ?? []) {
const section = (layout.data as T)[sectionId as keyof T];
if (section) {
sections.push(section);