Fixed bug where using the original randomId function would break.
This commit is contained in:
parent
ae5452b2e1
commit
e5c7ab517f
@ -43,9 +43,13 @@ class Realm {
|
|||||||
}
|
}
|
||||||
|
|
||||||
generateClientId (_randomId) {
|
generateClientId (_randomId) {
|
||||||
|
const originalRandomId = () => {
|
||||||
|
return (Math.random().toString(36) + '0000000000000000000').substr(2, 16);
|
||||||
|
}
|
||||||
|
|
||||||
const randomId = typeof _randomId === 'function' ?
|
const randomId = typeof _randomId === 'function' ?
|
||||||
() => _randomId :
|
() => _randomId :
|
||||||
() => (Math.random().toString(36) + '0000000000000000000').substr(2, 16);
|
() => originalRandomId;
|
||||||
|
|
||||||
let clientId = randomId(randomId)();
|
let clientId = randomId(randomId)();
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user