diff --git a/android/src/main/java/com/brentvatne/react/ReactVideoView.java b/android/src/main/java/com/brentvatne/react/ReactVideoView.java index 09e5220f..8eabeff1 100644 --- a/android/src/main/java/com/brentvatne/react/ReactVideoView.java +++ b/android/src/main/java/com/brentvatne/react/ReactVideoView.java @@ -641,14 +641,11 @@ public class ReactVideoView extends ScalableVideoView implements MediaPlayer.OnP * @see 'Adapted from https://github.com/artemyarulin/react-native-eval/blob/master/android/src/main/java/com/evaluator/react/ConversionUtil.java' */ public static Map toStringMap(@Nullable ReadableMap readableMap) { + Map result = new HashMap<>(); if (readableMap == null) - return null; + return result; com.facebook.react.bridge.ReadableMapKeySetIterator iterator = readableMap.keySetIterator(); - if (!iterator.hasNextKey()) - return null; - - Map result = new HashMap<>(); while (iterator.hasNextKey()) { String key = iterator.nextKey(); result.put(key, readableMap.getString(key));