mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Fix Java compile errors in JS-generated receiveCommand method
Summary: This diff adds a missing `switch` statement Reviewed By: makovkastar Differential Revision: D16892042 fbshipit-source-id: c162655445f3c0891d2377595a9389d419713bdf
This commit is contained in:
committed by
Facebook Github Bot
parent
b9899222a3
commit
cddc2c6c72
+9
-7
@@ -43,7 +43,9 @@ const propSetterTemplate = `
|
||||
|
||||
const commandsTemplate = `
|
||||
public void receiveCommand(::_INTERFACE_CLASSNAME_::<T> viewManager, T view, String commandName, ReadableArray args) {
|
||||
::_COMMAND_CASES_::
|
||||
switch (commandName) {
|
||||
::_COMMAND_CASES_::
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
@@ -173,13 +175,13 @@ function generateCommandCasesString(
|
||||
const commandMethods = component.commands
|
||||
.map(command => {
|
||||
return `case "${command.name}":
|
||||
viewManager.${toSafeJavaString(
|
||||
command.name,
|
||||
false,
|
||||
)}(${getCommandArguments(command)});
|
||||
break;`;
|
||||
viewManager.${toSafeJavaString(
|
||||
command.name,
|
||||
false,
|
||||
)}(${getCommandArguments(command)});
|
||||
break;`;
|
||||
})
|
||||
.join('\n' + ' ');
|
||||
.join('\n' + ' ');
|
||||
|
||||
return commandMethods;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user