Skip to content

Commit b758392

Browse files
authored
Merge pull request #899 from howljs/patch-1
Update unistyles_get_rn_version.rb
2 parents 8d31eda + c266377 commit b758392

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

unistyles_get_rn_version.rb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,15 @@ def unistyles_get_rn_version(rn_path)
55

66
maybe_rn_pkg_json = File.expand_path(File.join(rn_path, 'package.json'))
77
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')
89

910
rn_pkg_json =
1011
if File.exist?(maybe_rn_pkg_json)
1112
maybe_rn_pkg_json
1213
elsif File.exist?(maybe_local_rn_pkg_json)
1314
maybe_local_rn_pkg_json
15+
elsif File.exist?(maybe_react_native_pkg_json)
16+
maybe_react_native_pkg_json
1417
else
1518
nil
1619
end

0 commit comments

Comments
 (0)