Do not remove the view from the queue until it has navigated

This commit is contained in:
Maurice Parker 2020-07-08 13:44:13 -05:00
parent f138908e43
commit 3f036e91d3

View File

@ -112,8 +112,8 @@ class WebViewProviderDequeueOperation: MainThreadOperation {
func run() { func run() {
if let webView = queue.lastObject as? PreloadedWebView { if let webView = queue.lastObject as? PreloadedWebView {
queue.removeLastObject()
webView.ready { preloadedWebView in webView.ready { preloadedWebView in
self.queue.removeLastObject()
self.completion(preloadedWebView) self.completion(preloadedWebView)
} }
self.operationDelegate?.operationDidComplete(self) self.operationDelegate?.operationDidComplete(self)