mirror of
https://github.com/Microsoft/vscode
synced 2024-10-30 13:43:07 +00:00
Update makeRandomHexString() to remove duplicate character
This commit is contained in:
parent
a039b79971
commit
697c8901a9
1 changed files with 1 additions and 1 deletions
|
@ -7,7 +7,7 @@ import path = require('path');
|
|||
import os = require('os');
|
||||
|
||||
export function makeRandomHexString(length: number): string {
|
||||
let chars = ['0', '1', '2', '3', '4', '5', '6', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f'];
|
||||
const chars = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f'];
|
||||
let result = '';
|
||||
for (let i = 0; i < length; i++) {
|
||||
const idx = Math.floor(chars.length * Math.random());
|
||||
|
|
Loading…
Reference in a new issue