Skip to content

Commit

Permalink
fix(Android): Add a null check for mCellularGeneration to avoid a cra…
Browse files Browse the repository at this point in the history
…sh (#143 by @matt-oakes)
  • Loading branch information
matt-oakes committed Jul 15, 2019
1 parent 7c6f34b commit 097244e
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -98,7 +98,7 @@ private WritableMap createConnectivityEventMap() {
ConnectivityManagerCompat.isActiveNetworkMetered(getConnectivityManager());
details.putBoolean("isConnectionExpensive", isConnectionExpensive);

if (mConnectionType.equals(ConnectionType.CELLULAR)) {
if (mConnectionType.equals(ConnectionType.CELLULAR) && mCellularGeneration != null) {
details.putString("cellularGeneration", mCellularGeneration.label);
}
}
Expand Down

0 comments on commit 097244e

Please sign in to comment.