AndroidIconAnimator
AndroidIconAnimator copied to clipboard
App crashes on importing SVG
This SVG causes the app to crash:
https://gist.github.com/alexjlockwood/0db6f64f81eb1eb54434636155463615
The error in the JS console is something like 'can't get property stroke from undefined'.
To avoid the crash, I think maybe you have to change this function to:
let simpleAttr_ = (nodeAttr, contextAttr) => {
if (node.attributes && node.attributes[nodeAttr]) {
context[contextAttr] = node.attributes[nodeAttr].value;
}
};
I guess it is possible for node.attributes to be undefined if no attributes are specified.
There are some other instances of node.attributes that may need to be checked too.