1
0
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:
Amir Raminfar
2020-05-23 11:09:13 -07:00
parent d354c2b751
commit 129b5a75b2

View File

@@ -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));
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" });