return c.from.name || "@nonymous";
},
getRandomnessClass: function(c) {
- if (!Number.isInteger(c.options.randomness)) return {};
+ if (
+ // TODO: one extra test here
+ !Number.isInteger(c.options.randomness) &&
+ !parseInt(c.options.randomness, 10)
+ ) {
+ return {};
+ }
return {
["random-" + c.options.randomness]: true
};
this.conn = null;
},
getRandomnessClass: function(pc) {
- if (!Number.isInteger(pc.options.randomness)) return {};
+ if (
+ // TODO: one extra test here
+ !Number.isInteger(pc.options.randomness) &&
+ !parseInt(pc.options.randomness, 10)
+ ) {
+ return {};
+ }
return {
["random-" + pc.options.randomness]: true
};