From ae83c47bfed51ed9c4c98ccdd4459396cbddaf9f Mon Sep 17 00:00:00 2001 From: Brahim Hadriche Date: Sun, 30 Mar 2025 09:59:58 -0400 Subject: [PATCH] Fix bug with saving search history --- CHANGELOG.md | 1 + .../Services/SearchHistory/SearchHistoryUtils.bs | 8 +++++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7ba7ec85..e63b22f1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed - Playlet backend parsing issue in search results +- Bug with saving search history ## [0.36.2] - 2025-02-28 diff --git a/playlet-lib/src/components/Services/SearchHistory/SearchHistoryUtils.bs b/playlet-lib/src/components/Services/SearchHistory/SearchHistoryUtils.bs index 78d592c7..ed15b9a8 100644 --- a/playlet-lib/src/components/Services/SearchHistory/SearchHistoryUtils.bs +++ b/playlet-lib/src/components/Services/SearchHistory/SearchHistoryUtils.bs @@ -54,7 +54,13 @@ namespace SearchHistoryUtils if history = invalid return [] end if - return ParseJson(history) + + history = ParseJson(history) + if not IsArray(history) + return [] + end if + + return history end function function Clear()