Skip to content

Commit

Permalink
Modify Arguments.makeNativeObject to handle JavaOnlyMap and JavaOnlyA…
Browse files Browse the repository at this point in the history
…rray (facebook#36743)

Summary:
Pull Request resolved: facebook#36743

Changelog:
[Internal] - Modify Arguments.makeNativeObject to handle JavaOnlyMap and JavaOnlyArray

Reviewed By: mdvacca

Differential Revision: D44516305

fbshipit-source-id: 22a4de4ae1b231078e7cd59cda3993b9f6343f7d
  • Loading branch information
genkikondo authored and OlimpiaZurek committed May 22, 2023
1 parent 6f6dbb1 commit a1469f7
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@ private static Object makeNativeObject(Object object) {
return makeNativeMap((Map<String, Object>) object);
} else if (object instanceof Bundle) {
return makeNativeMap((Bundle) object);
} else if (object instanceof JavaOnlyMap) {
return makeNativeMap(((JavaOnlyMap) object).toHashMap());
} else if (object instanceof JavaOnlyArray) {
return makeNativeArray(((JavaOnlyArray) object).toArrayList());
} else {
// Boolean, Integer, Double, String, WritableNativeArray, WritableNativeMap
return object;
Expand Down

0 comments on commit a1469f7

Please sign in to comment.