Skip to content

Commit

Permalink
assert missing crypto.randomUUID (#8301)
Browse files Browse the repository at this point in the history
  • Loading branch information
luxzeitlos authored Nov 13, 2022
1 parent 6e9a51a commit 63e69ff
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/store/addon/-private/caches/identifier-cache.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@ if (macroCondition(getOwnConfig<{ polyfillUUID: boolean }>().polyfillUUID)) {
}

function uuidv4(): string {
assert(
'crypto.randomUUID needs to be avaliable. Some browsers incorrectly disallow it in insecure contexts. You maybe want to enable the polyfill: https://github.com/emberjs/data#randomuuid-polyfill',
_crypto.randomUUID
);
return _crypto.randomUUID();
}

Expand Down

0 comments on commit 63e69ff

Please sign in to comment.