Fix exception when showing move history if history is empty

This commit is contained in:
Calcitem 2021-06-22 01:24:34 +08:00
parent d007f9eb52
commit 91ad36d002
1 changed files with 4 additions and 0 deletions

View File

@ -351,6 +351,10 @@ class GameRecorder {
get movesCount => _history.length;
String buildMoveHistoryText({cols = 2}) {
if (_history.length == 0) {
return '';
}
var moveHistoryText = '';
int k = 1;
String num = "";