Fix checks failing on first tab
This commit is contained in:
parent
de5fbf711d
commit
9fc6ea0434
|
|
@ -60,7 +60,7 @@ class CommandDispatcher:
|
|||
def _count(self) -> int:
|
||||
"""Convenience method to get the widget count."""
|
||||
count = self._tabbed_browser.widget.count()
|
||||
if count <= 0:
|
||||
if count < 0:
|
||||
raise cmdutils.CommandError("No WebView available yet!")
|
||||
return count
|
||||
|
||||
|
|
@ -72,7 +72,7 @@ class CommandDispatcher:
|
|||
def _current_index(self):
|
||||
"""Convenience method to get the current widget index."""
|
||||
current_index = self._tabbed_browser.widget.currentIndex()
|
||||
if current_index <= 0:
|
||||
if current_index < 0:
|
||||
raise cmdutils.CommandError("No WebView available yet!")
|
||||
return current_index
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue