Skip to content

Commit 757657c

Browse files
committed
Use isUndefined to check for crypto
1 parent 5903b39 commit 757657c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/raven.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -808,7 +808,7 @@ function joinRegExp(patterns) {
808808
function uuid4() {
809809
var crypto = window.crypto || window.msCrypto;
810810

811-
if (typeof(crypto) !== 'undefined' && crypto.getRandomValues) {
811+
if (!isUndefined(crypto) && crypto.getRandomValues) {
812812
// Use window.crypto API if available
813813
var arr = new Uint16Array(8);
814814
crypto.getRandomValues(arr);

0 commit comments

Comments
 (0)