-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow call's input to be a string on Android #198
Conversation
@@ -19,12 +19,17 @@ public JSCallNode(int nodeID, ReadableMap config, NodesManager nodesManager) { | |||
@Override | |||
protected Double evaluate() { | |||
WritableArray args = Arguments.createArray(); | |||
for (int i = 0; i < mInputIDs.length; i++) { | |||
Node node = mNodesManager.findNodeById(mInputIDs[i], Node.class); | |||
for (int mInputID : mInputIDs) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
minor tweak.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
AFAIK this actually allocates an iterator, so it is not merely a tweak
@@ -19,12 +19,17 @@ public JSCallNode(int nodeID, ReadableMap config, NodesManager nodesManager) { | |||
@Override | |||
protected Double evaluate() { | |||
WritableArray args = Arguments.createArray(); | |||
for (int i = 0; i < mInputIDs.length; i++) { | |||
Node node = mNodesManager.findNodeById(mInputIDs[i], Node.class); | |||
for (int mInputID : mInputIDs) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for (int mInputID : mInputIDs) { | |
for (int i = 0; i < mInputIDs.length; i++) { |
for (int i = 0; i < mInputIDs.length; i++) { | ||
Node node = mNodesManager.findNodeById(mInputIDs[i], Node.class); | ||
for (int mInputID : mInputIDs) { | ||
Node node = mNodesManager.findNodeById(mInputID, Node.class); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Node node = mNodesManager.findNodeById(mInputID, Node.class); | |
Node node = mNodesManager.findNodeById(mInputIDs[i], Node.class); |
@@ -19,12 +19,17 @@ public JSCallNode(int nodeID, ReadableMap config, NodesManager nodesManager) { | |||
@Override | |||
protected Double evaluate() { | |||
WritableArray args = Arguments.createArray(); | |||
for (int i = 0; i < mInputIDs.length; i++) { | |||
Node node = mNodesManager.findNodeById(mInputIDs[i], Node.class); | |||
for (int mInputID : mInputIDs) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
AFAIK this actually allocates an iterator, so it is not merely a tweak
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
⚡️
Motivation
On Android JSCall exception is thrown type of node's value was string
Changes
Added condition for checking if type of node is a string and then handle it properly.