mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
[Fizz] Two More Fixes (#21288)
* Emit value of option tags * Mask the legacy context passed to classes
This commit is contained in:
@@ -729,15 +729,16 @@ function pushStartOption(
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 'value':
|
||||
value = propValue;
|
||||
break;
|
||||
case 'dangerouslySetInnerHTML':
|
||||
invariant(
|
||||
false,
|
||||
'`dangerouslySetInnerHTML` does not work on <option>.',
|
||||
);
|
||||
// eslint-disable-next-line-no-fallthrough
|
||||
case 'value':
|
||||
value = propValue;
|
||||
// We intentionally fallthrough to also set the attribute on the node.
|
||||
// eslint-disable-next-line-no-fallthrough
|
||||
default:
|
||||
pushAttribute(target, responseState, propKey, propValue);
|
||||
break;
|
||||
|
||||
+4
-4
@@ -563,11 +563,11 @@ function renderClassComponent(
|
||||
Component: any,
|
||||
props: any,
|
||||
): void {
|
||||
const unmaskedContext = !disableLegacyContext
|
||||
? task.legacyContext
|
||||
const maskedContext = !disableLegacyContext
|
||||
? getMaskedContext(Component, task.legacyContext)
|
||||
: undefined;
|
||||
const instance = constructClassInstance(Component, props, unmaskedContext);
|
||||
mountClassInstance(instance, Component, props, unmaskedContext);
|
||||
const instance = constructClassInstance(Component, props, maskedContext);
|
||||
mountClassInstance(instance, Component, props, maskedContext);
|
||||
finishClassComponent(request, task, instance, Component, props);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user