Allow tab name 0

pull/2023/head
shamoon 8 months ago
parent 898fb88d86
commit e663994c9b

@ -4,7 +4,7 @@ import classNames from "classnames";
import { TabContext } from "utils/contexts/tab";
export function slugify(tabName) {
return tabName ? encodeURIComponent(tabName.toString().replace(/\s+/g, '-').toLowerCase()) : ''
return tabName !== undefined ? encodeURIComponent(tabName.toString().replace(/\s+/g, '-').toLowerCase()) : ''
}
export default function Tab({ tab }) {

@ -239,7 +239,7 @@ function Home({ initialSettings }) {
const tabs = useMemo( () => [
...new Set(
Object.keys(settings.layout ?? {}).map(
(groupName) => settings.layout[groupName]?.tab
(groupName) => settings.layout[groupName]?.tab?.toString()
).filter(group => group)
)
], [settings.layout]);

Loading…
Cancel
Save