projects
/
vchess.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Remove unused move.color, format moves corr --> live after retrieval
[vchess.git]
/
client
/
src
/
utils
/
gameStorage.js
diff --git
a/client/src/utils/gameStorage.js
b/client/src/utils/gameStorage.js
index
0b3a7da
..
dc65379
100644
(file)
--- a/
client/src/utils/gameStorage.js
+++ b/
client/src/utils/gameStorage.js
@@
-133,7
+133,11
@@
export const GameStorage =
if (Number.isInteger(gameId) || !isNaN(parseInt(gameId)))
{
ajax("/games", "GET", {gid:gameId}, res => {
if (Number.isInteger(gameId) || !isNaN(parseInt(gameId)))
{
ajax("/games", "GET", {gid:gameId}, res => {
- callback(res.game);
+ let game = res.game;
+ game.moves.forEach(m => {
+ m.squares = JSON.parse(m.squares);
+ });
+ callback(game);
});
}
else //local game
});
}
else //local game