Skip to content

Commit

Permalink
Remove toString of dangerouslySetInnerHTML
Browse files Browse the repository at this point in the history
As far as I can tell, the toString call was added here:

caae627#diff-5574f655d491348f422bca600ff6711dR887

It was never really needed. Subsequently when we added Trusted Types,
this needed to be changed to a special call but we really should just
always let it pass through.
  • Loading branch information
sebmarkbage committed Jan 4, 2020
1 parent f749045 commit 3aaed14
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions packages/react-dom/src/client/ReactDOMComponent.js
Expand Up @@ -85,7 +85,6 @@ import possibleStandardNames from '../shared/possibleStandardNames';
import {validateProperties as validateARIAProperties} from '../shared/ReactDOMInvalidARIAHook';
import {validateProperties as validateInputProperties} from '../shared/ReactDOMNullInputValuePropHook';
import {validateProperties as validateUnknownProperties} from '../shared/ReactDOMUnknownPropertyHook';
import {toStringOrTrustedType} from './ToStringValue';

import {
enableDeprecatedFlareAPI,
Expand Down Expand Up @@ -789,7 +788,7 @@ export function diffProperties(
if (lastHtml !== nextHtml) {
(updatePayload = updatePayload || []).push(
propKey,
toStringOrTrustedType(nextHtml),
nextHtml,
);
}
} else {
Expand Down

0 comments on commit 3aaed14

Please sign in to comment.