projects
/
vchess.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fixes
[vchess.git]
/
client
/
src
/
components
/
MoveList.vue
diff --git
a/client/src/components/MoveList.vue
b/client/src/components/MoveList.vue
index
91607c2
..
1e19a2b
100644
(file)
--- a/
client/src/components/MoveList.vue
+++ b/
client/src/components/MoveList.vue
@@
-25,6
+25,8
@@
export default {
props: ["moves","cursor","score","message"],
watch: {
cursor: function(newValue) {
props: ["moves","cursor","score","message"],
watch: {
cursor: function(newValue) {
+ if (newValue < 0)
+ newValue = 0; //avoid rows[-1] --> error
// $nextTick to wait for table > tr to be rendered
this.$nextTick( () => {
let rows = document.querySelectorAll('#movesList tr');
// $nextTick to wait for table > tr to be rendered
this.$nextTick( () => {
let rows = document.querySelectorAll('#movesList tr');