Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
gaearon committed Dec 16, 2024
1 parent a67373b commit 62e49ee
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions patches/expo-modules-core+2.1.1.patch
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,23 @@ index 47c4d15..afe138d 100644
// Check for Content-Type
val skipContentTypes = listOf(
"text/event-stream", // Server Sent Events
diff --git a/node_modules/expo-modules-core/src/uuid/uuid.ts b/node_modules/expo-modules-core/src/uuid/uuid.ts
index 148beac..fabdff5 100644
--- a/node_modules/expo-modules-core/src/uuid/uuid.ts
+++ b/node_modules/expo-modules-core/src/uuid/uuid.ts
@@ -5,6 +5,7 @@ const nativeUuidv4 = globalThis?.expo?.uuidv4;
const nativeUuidv5 = globalThis?.expo?.uuidv5;

function uuidv4(): string {
+ const nativeUuidv4 = globalThis?.expo?.uuidv4;
if (!nativeUuidv4) {
throw Error(
"Native UUID version 4 generator implementation wasn't found in `expo-modules-core`"
@@ -23,6 +24,7 @@ function uuidv5(name: string, namespace: string | number[]) {
throw new Error('`namespace` must be a valid UUID string or an Array of 16 byte values');
}

+ const nativeUuidv5 = globalThis?.expo?.uuidv5;
if (!nativeUuidv5) {
throw Error("Native UUID type 5 generator implementation wasn't found in `expo-modules-core`");
}

0 comments on commit 62e49ee

Please sign in to comment.