Skip to content

Commit

Permalink
fix: mouseObject added to the url (#165)
Browse files Browse the repository at this point in the history
* fix: mouseObject added to the url
  • Loading branch information
imorland authored Oct 18, 2023
1 parent 774ac6c commit 0a71b5f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 3 additions & 2 deletions js/src/forum/pages/BlogComposer.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -177,8 +177,9 @@ export default class BlogComposer extends Page {
<LanguageDropdown
selected={this.articleLanguage()}
onclick={(language) => {
if (typeof language !== 'string') return;

this.articleLanguage(language);
m.redraw();
}}
/>
)}
Expand Down
2 changes: 2 additions & 0 deletions js/src/forum/pages/BlogOverview.js
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,8 @@ export default class BlogOverview extends Page {
<LanguageDropdown
selected={this.currentSelectedLanguage}
onclick={(language) => {
if (typeof language !== 'string') return;

this.currentSelectedLanguage = language;

m.route.set(document.location.pathname, {
Expand Down

0 comments on commit 0a71b5f

Please sign in to comment.