Fix back button on subview (#14251)

This commit is contained in:
Bram Kragten 2022-11-02 10:11:50 +01:00 committed by GitHub
parent 9cb168c439
commit 8cb0d38d78
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -747,10 +747,10 @@ class HUIRoot extends LitElement {
if (curViewConfig?.back_path) { if (curViewConfig?.back_path) {
navigate(curViewConfig.back_path); navigate(curViewConfig.back_path);
} else if (history.length > 0) { } else if (history.length > 1) {
history.back(); history.back();
} else { } else {
navigate(views[0].path!); navigate(this.route!.prefix);
} }
} }