Don't remove from queue until completion handler is called

This commit is contained in:
Maurice Parker 2020-07-08 16:00:48 -05:00
parent 5efc02f969
commit 739c14fb99
1 changed files with 1 additions and 1 deletions

View File

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