Fixed breaking syntax error with genRandomId function selection.
This commit is contained in:
parent
2eb7f9cfb1
commit
2a5d0b9cc3
@ -6,9 +6,7 @@ module.exports = ({ config, realm }) => {
|
||||
// Retrieve guaranteed random ID.
|
||||
app.get('/id', (req, res) => {
|
||||
res.contentType = 'text/html';
|
||||
res.send(realm.generateClientId(
|
||||
config.genRandomId ? config.genRandomId : undefined
|
||||
));
|
||||
res.send(realm.generateClientId(config.genRandomId));
|
||||
});
|
||||
|
||||
// Get a list of all peers for a key, enabled by the `allowDiscovery` flag.
|
||||
|
@ -48,8 +48,8 @@ class Realm {
|
||||
}
|
||||
|
||||
const genRandomId = _genRandomId && typeof _genRandomId === 'function' ?
|
||||
() => _genRandomId :
|
||||
() => originalGenRandomId;
|
||||
_genRandomId :
|
||||
originalGenRandomId;
|
||||
|
||||
let clientId = genRandomId();
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user