projects
/
vchess.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Typo in Minishogi
[vchess.git]
/
client
/
src
/
components
/
ChallengeList.vue
diff --git
a/client/src/components/ChallengeList.vue
b/client/src/components/ChallengeList.vue
index
21179a6
..
a1c46cd
100644
(file)
--- a/
client/src/components/ChallengeList.vue
+++ b/
client/src/components/ChallengeList.vue
@@
-62,17
+62,14
@@
export default {
return c.to || this.st.tr["Any player"];
return c.from.name || "@nonymous";
},
return c.to || this.st.tr["Any player"];
return c.from.name || "@nonymous";
},
+ // TODO: duplicated from Hall
getRandomnessClass: function(c) {
getRandomnessClass: function(c) {
- if (
- // TODO: one extra test here
- !Number.isInteger(c.options.randomness) &&
- !parseInt(c.options.randomness, 10)
- ) {
+ const opts = c.options;
+ if (opts.randomness === undefined && opts.random === undefined)
return {};
return {};
- }
- return {
- ["random-" + c.options.randomness]: true
- };
+ if (opts.randomness !== undefined)
+ return { ["random-" + opts.randomness]: true };
+ return { ["random-" + (opts.random ? 2 : 0)]: true };
}
}
};
}
}
};