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.
|
// Retrieve guaranteed random ID.
|
||||||
app.get('/id', (req, res) => {
|
app.get('/id', (req, res) => {
|
||||||
res.contentType = 'text/html';
|
res.contentType = 'text/html';
|
||||||
res.send(realm.generateClientId(
|
res.send(realm.generateClientId(config.genRandomId));
|
||||||
config.genRandomId ? config.genRandomId : undefined
|
|
||||||
));
|
|
||||||
});
|
});
|
||||||
|
|
||||||
// Get a list of all peers for a key, enabled by the `allowDiscovery` flag.
|
// 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' ?
|
const genRandomId = _genRandomId && typeof _genRandomId === 'function' ?
|
||||||
() => _genRandomId :
|
_genRandomId :
|
||||||
() => originalGenRandomId;
|
originalGenRandomId;
|
||||||
|
|
||||||
let clientId = genRandomId();
|
let clientId = genRandomId();
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user