Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit d0015eb

Browse files
authored
Update WKWebViewJavascriptBridgeBase.swift
fixed: When a handler is not registered, other calls in the queue cannot be executed
1 parent 4c43cd0 commit d0015eb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

‎WKWebViewJavascriptBridge/WKWebViewJavascriptBridgeBase.swift‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,10 +76,10 @@ public class WKWebViewJavascriptBridgeBase: NSObject {
7676
}
7777
}
7878

79-
guard let handlerName = message["handlerName"] as? String else { return }
79+
guard let handlerName = message["handlerName"] as? String else { continue }
8080
guard let handler = messageHandlers[handlerName] else {
8181
log("NoHandlerException, No handler for message from JS: \(message)")
82-
return
82+
continue
8383
}
8484
handler(message["data"] as? [String : Any], callback)
8585
}

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /