]> git.sesse.net Git - remoteglot/commitdiff
Fix a display bug on empty PV.
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Sun, 16 Nov 2014 12:39:49 +0000 (13:39 +0100)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Sun, 16 Nov 2014 12:39:49 +0000 (13:39 +0100)
www/js/remoteglot.js

index 3bff1ffa4d1c22ae489a5b8c698196cec2f522ac..f88e1e0dabaa6fbbdbe0bae0fee9ea6c39fddd85 100644 (file)
@@ -440,7 +440,7 @@ var print_pv = function(line_num, pretty_pv, move_num, toplay, opt_limit, opt_sh
                        ++i;
                }
                move_num += i / 2;
-       } else if (toplay == 'B') {
+       } else if (toplay == 'B' && pretty_pv.length > 0) {
                var move = "<a class=\"move\" id=\"automove" + line_num + "-0\" href=\"javascript:show_line(" + line_num + ", " + 0 + ");\">" + pretty_pv[0] + "</a>";
                pv = move_num + '. … ' + move;
                toplay = 'W';