mirror of
https://github.com/amir20/dozzle.git
synced 2025-12-21 21:33:18 +01:00
Uses == and fixes error messages
This commit is contained in:
@@ -10,8 +10,13 @@ export default {
|
||||
visibleContainers(newValue) {
|
||||
if (newValue) {
|
||||
if (this.$route.query.name) {
|
||||
const [container, _] = this.visibleContainers.filter((c) => c.name.includes(this.$route.query.name));
|
||||
this.$router.push({ name: "container", params: { id: container.id } });
|
||||
const [container, _] = this.visibleContainers.filter((c) => c.name == this.$route.query.name);
|
||||
if (container) {
|
||||
this.$router.push({ name: "container", params: { id: container.id } });
|
||||
} else {
|
||||
console.error(`No containers found matching name=${this.$route.query.name}. Redirecting to /`);
|
||||
this.$router.push({ name: "default" });
|
||||
}
|
||||
} else {
|
||||
console.error(`Expection query parameter name to be set. Redirecting to /`);
|
||||
this.$router.push({ name: "default" });
|
||||
|
||||
Reference in New Issue
Block a user