fix lodash random call
This commit is contained in:
		
							parent
							
								
									61eee6eaa1
								
							
						
					
					
						commit
						921f6ef12c
					
				| @ -14,11 +14,11 @@ export function objectIdFromDate(milliseconds: number, onlyDate: boolean = false | ||||
|       return '0'; | ||||
|     } | ||||
| 
 | ||||
|     return (_.random() * 16 | 0).toString(16); | ||||
|     return (_.random(0, 1, true) * 16 | 0).toString(16); | ||||
|   }; | ||||
| 
 | ||||
|   const timestamp = (milliseconds / 1000 | 0).toString(16); | ||||
|   const suffix = 'xxxxxxxxxxxxxxxx'.replace(/[x]/g, suffixReplacer).toLowerCase(); | ||||
|   const suffix = 'xxxxxxxxxxxxxxxx'.replace(/x/g, suffixReplacer).toLowerCase(); | ||||
| 
 | ||||
|   return `${timestamp}${suffix}`; | ||||
| } | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user