diff --git a/qutebrowser/browser/webengine/webenginetab.py b/qutebrowser/browser/webengine/webenginetab.py index e916c4243..864eb6ec8 100644 --- a/qutebrowser/browser/webengine/webenginetab.py +++ b/qutebrowser/browser/webengine/webenginetab.py @@ -339,7 +339,7 @@ class WebEngineElements(browsertab.AbstractElements): js_elem: The element serialized from javascript. """ log.webview.debug("Got element from JS: {!r}".format(js_elem)) - if js_elem is None: + if not js_elem: callback(None) else: elem = webengineelem.WebEngineElement(js_elem, tab=self)