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.
1 parent 31f6aff commit c408dd1Copy full SHA for c408dd1
packages/store/addon/-private/identifiers/utils/uuid-v4.ts
@@ -16,7 +16,13 @@ const CRYPTO = (() => {
16
if (isFastBoot) {
17
return {
18
getRandomValues(buffer: Uint8Array) {
19
- return (FastBoot as FastBoot).require('crypto').randomFillSync(buffer);
+ try {
20
+ return (FastBoot as FastBoot).require('crypto').randomFillSync(buffer);
21
+ } catch (err) {
22
+ throw new Error(
23
+ 'Using createRecord in Fastboot requires you to add the "crypto" package to "fastbootDependencies" in your package.json'
24
+ );
25
+ }
26
},
27
};
28
} else if (hasWindow && typeof window.crypto !== 'undefined') {
0 commit comments