소스 검색

Fixed bug where using the original randomId function would break.

Eden Tyler-Moss 5 년 전
부모
커밋
e5c7ab517f
1개의 변경된 파일5개의 추가작업 그리고 1개의 파일을 삭제
  1. 5 1
      src/models/realm.js

+ 5 - 1
src/models/realm.js

@@ -43,9 +43,13 @@ class Realm {
   }
 
   generateClientId (_randomId) {
+    const originalRandomId = () => {
+      return (Math.random().toString(36) + '0000000000000000000').substr(2, 16);
+    }
+
     const randomId = typeof _randomId === 'function' ?
       () => _randomId :
-      () => (Math.random().toString(36) + '0000000000000000000').substr(2, 16);
+      () => originalRandomId;
 
     let clientId = randomId(randomId)();