We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 455f9db + 2c9bb62 commit 5ce95ccCopy full SHA for 5ce95cc
index.js
@@ -27,7 +27,11 @@ function getRandomBase64 (byteLength) {
27
if (NativeModules.RNGetRandomValues) {
28
return NativeModules.RNGetRandomValues.getRandomBase64(byteLength)
29
} else if (NativeModules.ExpoRandom) {
30
+ // Expo SDK 41-44
31
return NativeModules.ExpoRandom.getRandomBase64String(byteLength)
32
+ } else if (global.ExpoModules) {
33
+ // Expo SDK 45+
34
+ return global.ExpoModules.ExpoRandom.getRandomBase64String(byteLength);
35
} else {
36
throw new Error('Native module not found')
37
}
0 commit comments