Returns no view type when next view type is unknown

Closes #13658
This commit is contained in:
Cédric Krier
2024-11-06 13:24:46 +01:00
parent 1a6a4ecb66
commit fdb7b33d50
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -936,7 +936,7 @@
var views = this.views.concat(this.view_to_load)
var next_view_index = (this.view_index + 1) % views.length;
var next_view = views[next_view_index];
if (typeof next_view != 'string') {
if (next_view && (typeof next_view != 'string')) {
next_view = next_view.view_type;
}
return next_view;
@@ -547,7 +547,7 @@ class Screen:
views = self.views + self.view_to_load
next_view_index = (self.view_index + 1) % len(views)
next_view = views[next_view_index]
if not isinstance(next_view, str):
if next_view and not isinstance(next_view, str):
next_view = next_view.view_type
return next_view