projects
/
vchess.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Some improvements (multi-tabs on same game seem fixed)
[vchess.git]
/
client
/
src
/
utils
/
gameStorage.js
diff --git
a/client/src/utils/gameStorage.js
b/client/src/utils/gameStorage.js
index
2e78994
..
480c73b
100644
(file)
--- a/
client/src/utils/gameStorage.js
+++ b/
client/src/utils/gameStorage.js
@@
-84,6
+84,8
@@
export const GameStorage = {
// Ignoring error silently: shouldn't happen now. TODO?
if (event.target.result) {
let game = event.target.result;
// Ignoring error silently: shouldn't happen now. TODO?
if (event.target.result) {
let game = event.target.result;
+ // Hidden tabs are delayed, to prevent multi-updates:
+ if (obj.moveIdx < game.moves.length) return;
Object.keys(obj).forEach(k => {
if (k == "move") game.moves.push(obj[k]);
else game[k] = obj[k];
Object.keys(obj).forEach(k => {
if (k == "move") game.moves.push(obj[k]);
else game[k] = obj[k];