mirror of
http://112.124.100.131/huang.ze/ebiz-dify-ai.git
synced 2025-12-16 06:16:53 +08:00
Fix variable typo (#8084)
This commit is contained in:
@@ -17,7 +17,7 @@ type Props = {
|
||||
|
||||
const Icon = ({ svgString, active }: { svgString: string; active: boolean }) => {
|
||||
const svgRef = useRef<SVGSVGElement | null>(null)
|
||||
const SVGParsor = (svg: string) => {
|
||||
const SVGParser = (svg: string) => {
|
||||
if (!svg)
|
||||
return null
|
||||
const parser = new DOMParser()
|
||||
@@ -25,7 +25,7 @@ const Icon = ({ svgString, active }: { svgString: string; active: boolean }) =>
|
||||
return doc.documentElement
|
||||
}
|
||||
useMount(() => {
|
||||
const svgElement = SVGParsor(svgString)
|
||||
const svgElement = SVGParser(svgString)
|
||||
if (svgRef.current && svgElement)
|
||||
svgRef.current.appendChild(svgElement)
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user