software-mansion/react-native-svg

LinearGradient crash with xlink:href

Open

#919 aberto em 31 de jan. de 2019

Ver no GitHub
 (6 comments) (3 reactions) (0 assignees)Java (1.076 forks)batch import
enhancementgood first issuehelp wantedstale

Métricas do repositório

Stars
 (7.107 stars)
Métricas de merge de PR
 (Mesclagem média 9d 18h) (1 fundiu PR em 30d)

Description

xlink:href are not supported, the use of it causes a crash. linearGradient that use xlink:href have no children elements which causes a call on undefined.

Example

<svg id="b809eb86-ec6b-4213-aa3e-83f4128e49a5" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg"
     xmlns:xlink="http://www.w3.org/1999/xlink" width="1082" height="725" viewBox="0 0 1082 725">
    <defs>
        <linearGradient id="b7709055-0dd4-48d6-ac10-5a758f15d1a1" x1="443.56" y1="792.13" x2="443.56" y2="251.5"
                        gradientUnits="userSpaceOnUse">
            <stop offset="0" stop-color="gray" stop-opacity="0.25"/>
            <stop offset="0.54" stop-color="gray" stop-opacity="0.12"/>
            <stop offset="1" stop-color="gray" stop-opacity="0.1"/>
        </linearGradient>
        <linearGradient id="f59ba046-7ebe-407e-be3d-c62856fc1078" x1="712" y1="788.54" x2="712" y2="248.5"
                        xlink:href="#b7709055-0dd4-48d6-ac10-5a758f15d1a1">
        </linearGradient>
    </defs>
</svg>

Guia do colaborador