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.
2 parents 8d31eda + c266377 commit b758392Copy full SHA for b758392
unistyles_get_rn_version.rb
@@ -5,12 +5,15 @@ def unistyles_get_rn_version(rn_path)
5
6
maybe_rn_pkg_json = File.expand_path(File.join(rn_path, 'package.json'))
7
maybe_local_rn_pkg_json = File.expand_path('./node_modules/react-native/package.json')
8
+ maybe_react_native_pkg_json = File.expand_path('../react-native/package.json')
9
10
rn_pkg_json =
11
if File.exist?(maybe_rn_pkg_json)
12
maybe_rn_pkg_json
13
elsif File.exist?(maybe_local_rn_pkg_json)
14
maybe_local_rn_pkg_json
15
+ elsif File.exist?(maybe_react_native_pkg_json)
16
+ maybe_react_native_pkg_json
17
else
18
nil
19
end
0 commit comments