1
1
mirror of https://github.com/exyte/Macaw.git synced 2024-09-21 01:47:44 +03:00

Fix crash when dasharray pattern is set to "none"

This commit is contained in:
Alisa Mylnikova 2018-05-15 15:47:45 +07:00
parent d061359af9
commit 368709ec0e

View File

@ -1215,6 +1215,9 @@ open class SVGParser {
if let doubleValue = Double(string) {
return doubleValue
}
if string == "none" {
return 0
}
guard let matcher = SVGParserRegexHelper.getUnitsIdenitifierMatcher() else { return .none }
let fullRange = NSRange(location: 0, length: string.count)
if let match = matcher.firstMatch(in: string, options: .reportCompletion, range: fullRange) {