Return empty bundle when passing an empty map to toBundle

Summary:
(I swear this was working before...)

Right now, when passing an empty map to `toBundle` it returns null:
- It feels counter-intuitive to have the data modified without any good reason;
- It is different from what iOS does

This PR fixes this behavior by returning an empty `Bundle` instead of `null`.

It is a breaking change though, and I'm not sure where it goes with the new bridge.
Closes https://github.com/facebook/react-native/pull/7847

Differential Revision: D3504024

fbshipit-source-id: 97ca19259fdf3219e8237e44a313645503a695fd
This commit is contained in:
Jimmy Mayoukou 2016-06-30 10:39:19 -07:00 коммит произвёл Facebook Github Bot 7
Родитель 08b7cb7963
Коммит 31f30aa4b3
1 изменённых файлов: 0 добавлений и 3 удалений

Просмотреть файл

@ -154,9 +154,6 @@ public class Arguments {
}
ReadableMapKeySetIterator iterator = readableMap.keySetIterator();
if (!iterator.hasNextKey()) {
return null;
}
Bundle bundle = new Bundle();
while (iterator.hasNextKey()) {