Skip to content

Commit

Permalink
fix: make empty arrays in config not suck
Browse files Browse the repository at this point in the history
  • Loading branch information
zlataovce committed Jan 7, 2025
1 parent 94ea6e0 commit d15224c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/config/ConfigDocBlock.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ const parseDefault = (
const hash = createUrlHash(parentKey, name);
useBrokenLinks().collectAnchor(hash);

if (value[0] === "[" && value[value.length - 1] === "]") {
if (value[0] === "[" && value[value.length - 1] === "]" && value !== "[]") {
const items: (string | ReactNode)[] = value
.replace("[", "")
.replace("]", "")
Expand Down

0 comments on commit d15224c

Please sign in to comment.