Skip to content

Commit 47b0bf4

Browse files
authored
Merge pull request #32 from IFB-ElixirFr/correction_button
bug fix
2 parents f87f121 + b205292 commit 47b0bf4

2 files changed

Lines changed: 8 additions & 5 deletions

File tree

components/DisplayContent.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ export default {
164164
state.value[this.path] = { status: "finish", step: this.step };
165165
const router = useRouter();
166166
router.push({
167-
path: "/" + this.lang,
167+
path: "/language/" + this.lang,
168168
});
169169
},
170170
},

components/content/Execute.vue

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,12 +44,13 @@ export default {
4444
4545
setup(props) {
4646
const store = useCommandStore();
47-
47+
const route = useRoute();
48+
let lang = route.params.lang;
4849
var id = new Date().valueOf();
4950
id = "editorArea" + id;
5051
const { resultTestChanged } = storeToRefs(store);
5152
52-
return { store, id, resultTestChanged };
53+
return { store, id, resultTestChanged, lang };
5354
},
5455
data() {
5556
return {
@@ -72,8 +73,10 @@ export default {
7273
this.store.updateCommand(this.editor.getValue());
7374
},
7475
async testCode() {
75-
await this.store.updateCommand(this.editor.getValue());
76-
await this.store.updateCommandTest(this.test.split("\n"), this.id);
76+
if (this.lang == "r") {
77+
await this.store.updateCommand(this.editor.getValue());
78+
await this.store.updateCommandTest(this.test.split("\n"), this.id);
79+
}
7780
},
7881
},
7982
watch: {

0 commit comments

Comments
 (0)