diff options
Diffstat (limited to 'app/src/main/kotlin/com/pitchedapps/frost/web/FrostJSI.kt')
-rw-r--r-- | app/src/main/kotlin/com/pitchedapps/frost/web/FrostJSI.kt | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/app/src/main/kotlin/com/pitchedapps/frost/web/FrostJSI.kt b/app/src/main/kotlin/com/pitchedapps/frost/web/FrostJSI.kt index 018ad737..f24a7a51 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/web/FrostJSI.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/web/FrostJSI.kt @@ -81,12 +81,14 @@ class FrostJSI(val webView: FrostWebViewCore) { } @JavascriptInterface - fun handleHtml(html: String) { + fun handleHtml(html: String?) { + html ?: return webView.post { webView.frostWebClient.handleHtml(html) } } @JavascriptInterface - fun handleHeader(html: String) { + fun handleHeader(html: String?) { + html ?: return headerObservable?.onNext(html) } |