Skip to content

Commit

Permalink
Remove toString of dangerouslySetInnerHTML (#17773)
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 edeea07
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 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 @@ -787,10 +786,7 @@ export function diffProperties(
const lastHtml = lastProp ? lastProp[HTML] : undefined;
if (nextHtml != null) {
if (lastHtml !== nextHtml) {
(updatePayload = updatePayload || []).push(
propKey,
toStringOrTrustedType(nextHtml),
);
(updatePayload = updatePayload || []).push(propKey, nextHtml);
}
} else {
// TODO: It might be too late to clear this if we have children
Expand Down

0 comments on commit edeea07

Please sign in to comment.