We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1b334e6 commit 4c37d65Copy full SHA for 4c37d65
web/app/components/base/icons/utils.ts
@@ -3,13 +3,13 @@ import React from 'react'
3
export type AbstractNode = {
4
name: string
5
attributes: {
6
- [key: string]: string
+ [key: string]: string | undefined
7
}
8
children?: AbstractNode[]
9
10
11
export type Attrs = {
12
13
14
15
export function normalizeAttrs(attrs: Attrs = {}): Attrs {
@@ -24,6 +24,9 @@ export function normalizeAttrs(attrs: Attrs = {}): Attrs {
24
return acc
25
26
const val = attrs[key]
27
+ if (val === undefined)
28
+ return acc
29
+
30
key = key.replace(/([-]\w)/g, (g: string) => g[1].toUpperCase())
31
key = key.replace(/([:]\w)/g, (g: string) => g[1].toUpperCase())
32
0 commit comments