Allow numbers in tab name (#2004)

This commit is contained in:
shamoon
2023-09-16 14:37:06 -07:00
committed by GitHub
parent 6f5c2a8c1e
commit 898fb88d86

View File

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