X-Git-Url: https://git.auder.net/js/rpsls.js?a=blobdiff_plain;f=client%2Fsrc%2Fviews%2FProblems.vue;h=1c990649bf2256825930d7960e47661feaa27f88;hb=0cd026057235122150be0f1eb4c72e5f5902a447;hp=3a700eabfd56887c9219225cf213c89bfb54d1ec;hpb=98b94cc3504937ae0af29a265394dfe52ea1ee67;p=vchess.git diff --git a/client/src/views/Problems.vue b/client/src/views/Problems.vue index 3a700eab..1c990649 100644 --- a/client/src/views/Problems.vue +++ b/client/src/views/Problems.vue @@ -306,15 +306,16 @@ export default { if (edit) { let editedP = this.problems.find(p => p.id == this.curproblem.id); this.copyProblem(this.curproblem, editedP); - } //new problem + } else { + // New problem let newProblem = Object.assign({}, this.curproblem); newProblem.id = ret.id; newProblem.uid = this.st.user.id; newProblem.uname = this.st.user.name; this.problems = this.problems.concat(newProblem); + this.resetCurProb(); } - this.resetCurProb(); this.infoMsg = ""; } );