refactor sonarqube findings
This commit is contained in:
@@ -30,7 +30,7 @@ globalThis.Wegwichtel = globalThis.Wegwichtel || {};
|
||||
return existing;
|
||||
}
|
||||
if (typeof globalThis.crypto?.getRandomValues !== 'function') {
|
||||
throw new Error(ns.I18n.t("local.error.identity"));
|
||||
throw new TypeError(ns.I18n.t("local.error.identity"));
|
||||
}
|
||||
const bytes = globalThis.crypto.getRandomValues(new Uint8Array(32));
|
||||
const value = Array.from(bytes, byte => byte.toString(16).padStart(2, '0')).join('');
|
||||
|
||||
Reference in New Issue
Block a user