Fixed breaking syntax error with genRandomId function selection.

This commit is contained in:
Eden Tyler-Moss 2020-01-31 10:34:35 +00:00
parent 2eb7f9cfb1
commit 2a5d0b9cc3
2 changed files with 3 additions and 5 deletions

View File

@ -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.

View File

@ -48,8 +48,8 @@ class Realm {
}
const genRandomId = _genRandomId && typeof _genRandomId === 'function' ?
() => _genRandomId :
() => originalGenRandomId;
_genRandomId :
originalGenRandomId;
let clientId = genRandomId();