GeezerVison is showing github.com — [Fizz] Two More Fixes (#21288) · react/react@9eddfbf
File tree
Expand file treeCollapse file tree
Open diff view settings
Expand file treeCollapse file tree
Open diff view settings
Collapse file
Copy file name to clipboardExpand all lines: packages/react-dom/src/server/ReactDOMServerFormatConfig.js +4-3Lines changed: 4 additions & 3 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -729,15 +729,16 @@ function pushStartOption( |
729 | 729 | } |
730 | 730 | } |
731 | 731 | break; |
732 | | - case 'value': |
733 | | - value = propValue; |
734 | | - break; |
735 | 732 | case 'dangerouslySetInnerHTML': |
736 | 733 | invariant( |
737 | 734 | false, |
738 | 735 | '`dangerouslySetInnerHTML` does not work on <option>.', |
739 | 736 | ); |
740 | 737 | // eslint-disable-next-line-no-fallthrough |
| 738 | + case 'value': |
| 739 | + value = propValue; |
| 740 | + // We intentionally fallthrough to also set the attribute on the node. |
| 741 | + // eslint-disable-next-line-no-fallthrough |
741 | 742 | default: |
742 | 743 | pushAttribute(target, responseState, propKey, propValue); |
743 | 744 | break; |
|
Collapse file
Copy file name to clipboardExpand all lines: packages/react-server/src/ReactFizzServer.js +4-4Lines changed: 4 additions & 4 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -563,11 +563,11 @@ function renderClassComponent( |
563 | 563 | Component: any, |
564 | 564 | props: any, |
565 | 565 | ): void { |
566 | | - const unmaskedContext = !disableLegacyContext |
567 | | - ? task.legacyContext |
| 566 | + const maskedContext = !disableLegacyContext |
| 567 | + ? getMaskedContext(Component, task.legacyContext) |
568 | 568 | : undefined; |
569 | | - const instance = constructClassInstance(Component, props, unmaskedContext); |
570 | | - mountClassInstance(instance, Component, props, unmaskedContext); |
| 569 | + const instance = constructClassInstance(Component, props, maskedContext); |
| 570 | + mountClassInstance(instance, Component, props, maskedContext); |
571 | 571 | finishClassComponent(request, task, instance, Component, props); |
572 | 572 | } |
573 | 573 |
|
|