You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Found this issue with some of my SVGs. Your id replacement code both fixPropWithUrl, and getHookedXlinkHref won't work with any of these ids: #url, #ur, #rl, #u, #r, #l.
This is because you just replace the old id with the new id in the prop:
returnprop.replace(id,fixedId)
When my id is #l (so the prop is url(#l)) that results in something like ur___SVG_ID__2__10___(#l)
A simple fix would be to do
return`url(#${fixedId})`
Instead
The text was updated successfully, but these errors were encountered:
MacDue
changed the title
URL fixing broken for the ids #url, #ur, #rl, #u, #r, #l
URL ID fixing broken for the ids #url, #ur, #rl, #u, #r, #l
Mar 30, 2020
Found this issue with some of my SVGs. Your id replacement code both
fixPropWithUrl
, andgetHookedXlinkHref
won't work with any of these ids: #url, #ur, #rl, #u, #r, #l.This is because you just replace the old id with the new id in the prop:
When my id is
#l
(so the prop isurl(#l)
) that results in something likeur___SVG_ID__2__10___(#l)
A simple fix would be to do
Instead
The text was updated successfully, but these errors were encountered: