mirror of
https://github.com/zoriya/react-native-svg.git
synced 2026-05-26 12:29:10 +00:00
fix: handle null passed to SvgLength (#1903)
SvgLength from method should be able to parse null since it is a correct value, we then use the empty constructor since it provides default values.
This commit is contained in:
@@ -104,11 +104,11 @@ class SVGLength {
|
||||
}
|
||||
|
||||
static SVGLength from(String string) {
|
||||
return new SVGLength(string);
|
||||
return string != null ? new SVGLength(string) : new SVGLength();
|
||||
}
|
||||
|
||||
static SVGLength from(Double value) {
|
||||
return new SVGLength(value);
|
||||
return value != null ? new SVGLength(value) : new SVGLength();
|
||||
}
|
||||
|
||||
static String toString(Dynamic dynamic) {
|
||||
|
||||
Reference in New Issue
Block a user