From 34847f33213a1d5ab2d8afef58e799524c00f722 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Ml=C3=A1dek?= Date: Sun, 30 Jan 2022 16:20:02 +0100 Subject: [PATCH] fix search ("contains" query, UpObject params bug) --- src/database/lang.rs | 2 +- webui/src/components/display/UpObject.svelte | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/database/lang.rs b/src/database/lang.rs index ebb2c3f..074cff2 100644 --- a/src/database/lang.rs +++ b/src/database/lang.rs @@ -303,7 +303,7 @@ impl Query { } } QueryComponent::Contains(q_value) => subqueries - .push(Box::new(data::value_str.like(format!("J%{}%", q_value)))), + .push(Box::new(data::value_str.like(format!("S%{}%", q_value)))), QueryComponent::Any => {} }; diff --git a/webui/src/components/display/UpObject.svelte b/webui/src/components/display/UpObject.svelte index 86627ff..45b3e5c 100644 --- a/webui/src/components/display/UpObject.svelte +++ b/webui/src/components/display/UpObject.svelte @@ -37,7 +37,7 @@ // Navigation highlights const index = (getContext("browse") as { index: Readable })?.index || undefined; - $: addresses = $params.addresses.split(","); + $: addresses = $params.addresses?.split(",") || []; // Native open function nativeOpen() {