Skip to content

Commit

Permalink
Merge pull request #12067 from rtibbles/vue-router-redirect
Browse files Browse the repository at this point in the history
Use router.replace for redirect.
  • Loading branch information
marcellamaki authored Apr 24, 2024
2 parents ee90868 + 184bc10 commit 71f2f64
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions kolibri/plugins/learn/assets/src/views/TopicsContentPage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,6 @@
import { AddDeviceForm } from 'kolibri.coreVue.componentSets.sync';
import { ContentNodeKinds, ContentErrorConstants } from 'kolibri.coreVue.vuex.constants';
import { crossComponentTranslator } from 'kolibri.utils.i18n';
import redirectBrowser from 'kolibri.utils.redirectBrowser';
import samePageCheckGenerator from 'kolibri.utils.samePageCheckGenerator';
import client from 'kolibri.client';
import urls from 'kolibri.urls';
Expand Down Expand Up @@ -520,7 +519,7 @@
if (this.content) {
const id = this.content.id;
if (!this.isUserLoggedIn && (this.lessonId || this.classId)) {
redirectBrowser(window.location.href.split('?')[0]);
this.$router.replace({ ...this.$route, query: null });
}
client({
method: 'get',
Expand Down

0 comments on commit 71f2f64

Please sign in to comment.