From 0a71b5f84a85a5195a493781a8f1001e7637e748 Mon Sep 17 00:00:00 2001 From: IanM <16573496+imorland@users.noreply.github.com> Date: Wed, 18 Oct 2023 12:26:10 +0100 Subject: [PATCH] fix: mouseObject added to the url (#165) * fix: mouseObject added to the url --- js/src/forum/pages/BlogComposer.js | 5 +++-- js/src/forum/pages/BlogOverview.js | 2 ++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/js/src/forum/pages/BlogComposer.js b/js/src/forum/pages/BlogComposer.js index 1637626..2ee7b0c 100644 --- a/js/src/forum/pages/BlogComposer.js +++ b/js/src/forum/pages/BlogComposer.js @@ -33,7 +33,7 @@ export default class BlogComposer extends Page { this.bodyClass = 'BlogItemPage BlogItemPage--composer'; // Article data - this.articleLanguage = new Stream(m.route.param('lang') ? m.route.param('lang') : app.translator.locale); + this.articleLanguage = Stream(m.route.param('lang') ? m.route.param('lang') : app.translator.locale); this.article = app.store.createRecord('discussions'); this.blogMeta = null; @@ -177,8 +177,9 @@ export default class BlogComposer extends Page { { + if (typeof language !== 'string') return; + this.articleLanguage(language); - m.redraw(); }} /> )} diff --git a/js/src/forum/pages/BlogOverview.js b/js/src/forum/pages/BlogOverview.js index 2760ca6..129026c 100644 --- a/js/src/forum/pages/BlogOverview.js +++ b/js/src/forum/pages/BlogOverview.js @@ -159,6 +159,8 @@ export default class BlogOverview extends Page { { + if (typeof language !== 'string') return; + this.currentSelectedLanguage = language; m.route.set(document.location.pathname, {