Skip to content

Commit 7f8701c

Browse files
authored
Merge pull request #1078 from kmathy/fix/Uint8Array
fix(randomService): fix misuse of Uint8Array
2 parents 003d3ce + f9b7ebd commit 7f8701c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

projects/angular-auth-oidc-client/src/lib/flows/random/random.service.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ export class RandomService {
1717
}
1818

1919
const length = requiredLength - 6;
20-
const arr = new Uint8Array((length || length) / 2);
20+
const arr = new Uint8Array(Math.floor((length || length) / 2));
2121
if (this.getCrypto()) {
2222
this.getCrypto().getRandomValues(arr);
2323
}

0 commit comments

Comments
 (0)