about summary refs log tree commit diff
path: root/src/view/com/util/forms/DropdownButton.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'src/view/com/util/forms/DropdownButton.tsx')
-rw-r--r--src/view/com/util/forms/DropdownButton.tsx6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/view/com/util/forms/DropdownButton.tsx b/src/view/com/util/forms/DropdownButton.tsx
index 1fa03f4c7..f911529d2 100644
--- a/src/view/com/util/forms/DropdownButton.tsx
+++ b/src/view/com/util/forms/DropdownButton.tsx
@@ -76,7 +76,11 @@ export function DropdownButton({
         onPress={onPress}
         hitSlop={HITSLOP}
         // Fix an issue where specific references cause runtime error in jest environment
-        ref={process.env.JEST_WORKER_ID != null ? null : ref}>
+        ref={
+          typeof process !== 'undefined' && process.env.JEST_WORKER_ID != null
+            ? null
+            : ref
+        }>
         {children}
       </TouchableOpacity>
     )