don't fail on invalid analysis path (from the URL)
This commit is contained in:
parent
2940aed8f5
commit
387e01633c
|
@ -23,7 +23,13 @@ module.exports = function(cfg, router, i18n, onChange) {
|
|||
|
||||
var situationCache = {};
|
||||
var showGround = function() {
|
||||
var moves = this.analyse.moveList(this.vm.path);
|
||||
var moves;
|
||||
try {
|
||||
moves = this.analyse.moveList(this.vm.path);
|
||||
} catch (e) {
|
||||
this.vm.path = treePath.default();
|
||||
moves = this.analyse.moveList(this.vm.path);
|
||||
}
|
||||
var nbMoves = moves.length;
|
||||
var ply, move, cached, fen, hash = '',
|
||||
h = '',
|
||||
|
|
Loading…
Reference in a new issue