1
0
Fork 0

No issue: Fixes home crash if url host is malformed

master
Sawyer Blatz 2019-05-20 07:39:01 -07:00 committed by Jeff Boek
parent 2035be8cc6
commit f912621bc3
1 changed files with 3 additions and 1 deletions

View File

@ -40,6 +40,8 @@ fun String?.urlToTrimmedHost(): String {
else -> url.host
}
} catch (e: MalformedURLException) {
""
this.urlToHost()
} catch (e: StringIndexOutOfBoundsException) {
this.urlToHost()
}
}