Skip to content

Commit bd94547

Browse files
committed
Remove useless code
1 parent af07d4c commit bd94547

File tree

1 file changed

+0
-12
lines changed

1 file changed

+0
-12
lines changed

Sources/NTLBridge/NTLWebView.swift

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -541,16 +541,6 @@ extension NTLWebView: WKScriptMessageHandler {
541541
}
542542
}
543543

544-
private func handleCallbackResponse(callbackStub: String, data: JSONValue?) {
545-
guard let callbackId = Int(callbackStub),
546-
let completion = pendingCallbacks.removeValue(forKey: callbackId) else {
547-
debugLog("No pending callback found for stub: \(callbackStub)")
548-
return
549-
}
550-
551-
completion(.success(data))
552-
}
553-
554544
internal func handleReturnValueFromJS(_ param: JSONValue) {
555545
guard case let .dictionary(dictionary) = param, let callbackId = dictionary["id"]?.numberValue
556546
else { return }
@@ -559,8 +549,6 @@ extension NTLWebView: WKScriptMessageHandler {
559549
let complete = dictionary["complete"]?.boolValue ?? true
560550
let error = dictionary["error"]
561551

562-
563-
564552
if let completion = pendingCallbacks[callbackIdInt] {
565553
if complete {
566554
pendingCallbacks.removeValue(forKey: callbackIdInt)

0 commit comments

Comments
 (0)