diff --git a/src/views/DocumentationTopic.vue b/src/views/DocumentationTopic.vue
index 60800bddd..a517e729f 100644
--- a/src/views/DocumentationTopic.vue
+++ b/src/views/DocumentationTopic.vue
@@ -13,7 +13,7 @@
@@ -66,6 +66,10 @@ export default {
this.topicDataDefault = data;
},
},
+ topicKey: ({ $route, topicProps }) => [
+ $route.path,
+ topicProps.interfaceLanguage,
+ ].join(),
topicProps() {
const {
abstract,
@@ -126,6 +130,9 @@ export default {
},
},
methods: {
+ applyObjcOverrides() {
+ this.topicDataObjc = apply(clone(this.topicData), this.objcOverrides);
+ },
handleCodeColorsChange(codeColors) {
CodeThemeStore.updateCodeColors(codeColors);
},
@@ -148,19 +155,22 @@ export default {
fetchDataForRouteEnter(to, from, next).then(data => next((vm) => {
vm.topicData = data; // eslint-disable-line no-param-reassign
if (to.query.language === Language.objectiveC.key.url && vm.objcOverrides) {
- // eslint-disable-next-line no-param-reassign
- vm.topicDataObjc = apply(clone(vm.topicData), vm.objcOverrides);
+ vm.applyObjcOverrides();
}
})).catch(next);
},
beforeRouteUpdate(to, from, next) {
- if (to.query.language === Language.objectiveC.key.url && this.objcOverrides) {
- this.topicDataObjc = apply(clone(this.topicData), this.objcOverrides);
+ if (to.path === from.path && to.query.language === Language.objectiveC.key.url
+ && this.objcOverrides) {
+ this.applyObjcOverrides();
next();
} else if (shouldFetchDataForRouteUpdate(to, from)) {
fetchDataForRouteEnter(to, from, next).then((data) => {
this.topicDataObjc = null;
this.topicData = data;
+ if (to.query.language === Language.objectiveC.key.url && this.objcOverrides) {
+ this.applyObjcOverrides();
+ }
next();
}).catch(next);
} else {
diff --git a/src/views/Topic.vue b/src/views/Topic.vue
index 8c85827ce..084ecc383 100644
--- a/src/views/Topic.vue
+++ b/src/views/Topic.vue
@@ -14,7 +14,7 @@
v-if="topicData"
v-bind="propsFor(topicData)"
:is="componentFor(topicData)"
- :key="topicData.identifier.url"
+ :key="topicKey"
:hierarchy="hierarchy"
/>
@@ -69,6 +69,10 @@ export default {
technologyNavigation,
};
},
+ topicKey: ({ $route, topicData }) => [
+ $route.path,
+ topicData.identifier.interfaceLanguage,
+ ].join(),
},
beforeRouteEnter(to, from, next) {
fetchDataForRouteEnter(to, from, next).then(data => next((vm) => {
diff --git a/src/views/TutorialsOverview.vue b/src/views/TutorialsOverview.vue
index 2e7ce2fe3..4b010f13d 100644
--- a/src/views/TutorialsOverview.vue
+++ b/src/views/TutorialsOverview.vue
@@ -9,7 +9,7 @@
-->
-
+