X-Git-Url: https://git.auder.net/?a=blobdiff_plain;f=client%2Fsrc%2Fviews%2FProblems.vue;h=f1c2d08a13088fb2fd88014517fcd99479a7cec8;hb=6f2f94374f1e73c375edf732d9425e575e81fff7;hp=cfc0637eae55458546c86ce35a3e18201b9e956b;hpb=84fc0f02d3d399af66c40b3e9994f67b415ffd0e;p=vchess.git diff --git a/client/src/views/Problems.vue b/client/src/views/Problems.vue index cfc0637e..f1c2d08a 100644 --- a/client/src/views/Problems.vue +++ b/client/src/views/Problems.vue @@ -144,11 +144,11 @@ export default { problems: { "mine": [], "others": [] }, // timestamp of oldest showed problem: cursor: { - "mine": Number.MAX_SAFE_INTEGER, - "others": Number.MAX_SAFE_INTEGER + mine: Number.MAX_SAFE_INTEGER, + others: Number.MAX_SAFE_INTEGER }, // hasMore == TRUE: a priori there could be more problems to load - hasMore: { "mine": true, "others": true }, + hasMore: { mine: true, others: true }, onlyMine: false, showOne: false, infoMsg: "", @@ -273,6 +273,7 @@ export default { this.loadVariant(prob.vid, () => { // Set FEN if possible (might not be correct yet) if (V.IsGoodFen(prob.fen)) this.setDiagram(prob); + else prob.diag = ""; }); }, loadVariant: async function(vid, cb) { @@ -291,6 +292,7 @@ export default { // variant could not be ready, or not defined if (prob.vid > 0 && this.loadedVar == prob.vid && V.IsGoodFen(prob.fen)) this.setDiagram(prob); + else prob.diag = ""; }, setDiagram: function(prob) { // Condition: prob.fen is correct and global V is ready @@ -371,7 +373,7 @@ export default { data: { prob: this.curproblem }, success: (ret) => { if (edit) { - let editedP = this.problems.find(p => p.id == this.curproblem.id); + let editedP = this.problems["mine"].find(p => p.id == this.curproblem.id); this.copyProblem(this.curproblem, editedP); this.showProblem(editedP); }