Skip to content

Commit 0a18e5d

Browse files
committed
Add nil check
1 parent 0977174 commit 0a18e5d

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

packages/react-native-gesture-handler/scripts/gesture_handler_utils.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,9 @@ def get_react_native_minor_version()
1717

1818
if react_native_json == nil
1919
node_modules_dir = ENV["REACT_NATIVE_NODE_MODULES_DIR"]
20-
react_native_json = try_to_parse_react_native_package_json(File.join(node_modules_dir, 'react-native'))
20+
if node_modules_dir != nil
21+
react_native_json = try_to_parse_react_native_package_json(File.join(node_modules_dir, 'react-native'))
22+
end
2123
end
2224

2325
if react_native_json == nil

0 commit comments

Comments
 (0)