Skip to content

Commit

Permalink
Merge pull request #2 from jevakallio/fix/react-native-prod-build-tra…
Browse files Browse the repository at this point in the history
…nspilation

Workaround for Metro bundler issue https://github.com/facebook/metro-…
  • Loading branch information
ktj authored Oct 10, 2017
2 parents 7051517 + 4de9a02 commit 1174e46
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/modules/Platform.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,10 @@ const Platform = {
return obj.default;
},
inject: platform => {
Platform.OS = platform.OS;
Platform.Version = platform.Version;
// Use bracket accessor notation as workaround for
// https://github.com/facebook/metro-bundler/issues/27
Platform['OS'] = platform.OS; // eslint-disable-line dot-notation
Platform['Version'] = platform.Version; // eslint-disable-line dot-notation
},
};

Expand Down

0 comments on commit 1174e46

Please sign in to comment.