From 91a97d75da7e7425635dc3c94c7c39de5f2e3a5d Mon Sep 17 00:00:00 2001 From: Joffrey JAFFEUX Date: Mon, 10 Mar 2025 21:05:38 +0100 Subject: [PATCH] FIX: prevents double escaping of filters We were passing: `{"category": 4}` which was then escape by Ember, basically causing a double Json stringify and preventing code to work down the road. --- .../discourse/components/admin-report-sentiment-analysis.gjs | 1 + 1 file changed, 1 insertion(+) diff --git a/assets/javascripts/discourse/components/admin-report-sentiment-analysis.gjs b/assets/javascripts/discourse/components/admin-report-sentiment-analysis.gjs index 2354ec14..ce1f58fb 100644 --- a/assets/javascripts/discourse/components/admin-report-sentiment-analysis.gjs +++ b/assets/javascripts/discourse/components/admin-report-sentiment-analysis.gjs @@ -219,6 +219,7 @@ export default class AdminReportSentimentAnalysis extends Component { this.router.transitionTo(this.router.currentRoute.name, { queryParams: { ...currentQueryParams, + filters: JSON.parse(currentQueryParams.filters), // avoids a double escaping selectedChart: data.title, }, });