diff --git a/src/features/tabs/tabFamily.ts b/src/features/tabs/tabFamily.ts index a113f5c..316b131 100644 --- a/src/features/tabs/tabFamily.ts +++ b/src/features/tabs/tabFamily.ts @@ -92,7 +92,7 @@ export type GenericTabFamily = Replace< export function createTabFamily( tabs: Record TabButtonOptions>, - optionsFunc: OptionsFunc, BaseTabFamily> + optionsFunc?: OptionsFunc, BaseTabFamily> ): TabFamily { if (Object.keys(tabs).length === 0) { console.warn("Cannot create tab family with 0 tabs"); @@ -100,7 +100,7 @@ export function createTabFamily( } return createLazyProxy(persistent => { - const tabFamily = Object.assign(persistent, optionsFunc()); + const tabFamily = Object.assign(persistent, optionsFunc?.()); tabFamily.id = getUniqueID("tabFamily-"); tabFamily.type = TabFamilyType;