We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 44bfffb commit 0b4fd62Copy full SHA for 0b4fd62
ReactCommon/cxxreact/JSCExecutor.cpp
@@ -113,7 +113,11 @@ static JSValueRef nativeInjectHMRUpdate(
113
const JSValueRef arguments[],
114
JSValueRef* exception) {
115
String execJSString = Value(ctx, arguments[0]).toString();
116
- String jsURL = Value(ctx, arguments[1]).toString();
+ // Temporary workaround for 0.57 and Metro 48 which did not pass second
117
+ // argument to this function.
118
+ // Actually we probably should to check both arguments before use and
119
+ // throw JS exception with suitable error string.
120
+ String jsURL = argumentCount > 1 ? Value(ctx, arguments[1]).toString() : String();
121
evaluateScript(ctx, execJSString, jsURL);
122
return Value::makeUndefined(ctx);
123
}
0 commit comments