mirror of
https://github.com/bitwarden/browser
synced 2025-12-17 08:43:33 +00:00
Handle null in utils
This commit is contained in:
@@ -97,6 +97,9 @@ export class Utils {
|
||||
}
|
||||
|
||||
static fromByteStringToArray(str: string): Uint8Array {
|
||||
if (str == null) {
|
||||
return null;
|
||||
}
|
||||
const arr = new Uint8Array(str.length);
|
||||
for (let i = 0; i < str.length; i++) {
|
||||
arr[i] = str.charCodeAt(i);
|
||||
|
||||
Reference in New Issue
Block a user