Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions packages/react-dom/src/server/DOMMarkupOperations.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ import warning from 'fbjs/lib/warning';

// isAttributeNameSafe() is currently duplicated in DOMPropertyOperations.
// TODO: Find a better place for this.
var VALID_ATTRIBUTE_NAME_REGEX = new RegExp(
const VALID_ATTRIBUTE_NAME_REGEX = new RegExp(
'^[' + ATTRIBUTE_NAME_START_CHAR + '][' + ATTRIBUTE_NAME_CHAR + ']*$',
);
var illegalAttributeNameCache = {};
var validatedAttributeNameCache = {};
const illegalAttributeNameCache = {};
const validatedAttributeNameCache = {};
function isAttributeNameSafe(attributeName) {
if (validatedAttributeNameCache.hasOwnProperty(attributeName)) {
return true;
Expand Down Expand Up @@ -80,12 +80,12 @@ export function createMarkupForRoot() {
* @return {?string} Markup string, or null if the property was invalid.
*/
export function createMarkupForProperty(name, value) {
var propertyInfo = getPropertyInfo(name);
const propertyInfo = getPropertyInfo(name);
if (propertyInfo) {
if (shouldIgnoreValue(propertyInfo, value)) {
return '';
}
var attributeName = propertyInfo.attributeName;
const attributeName = propertyInfo.attributeName;
if (
propertyInfo.hasBooleanValue ||
(propertyInfo.hasOverloadedBooleanValue && value === true)
Expand Down
8 changes: 4 additions & 4 deletions packages/react-dom/src/server/ReactDOMStringRenderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ import ReactPartialRenderer from './ReactPartialRenderer';
* See https://reactjs.org/docs/react-dom-server.html#rendertostring
*/
export function renderToString(element) {
var renderer = new ReactPartialRenderer(element, false);
var markup = renderer.read(Infinity);
const renderer = new ReactPartialRenderer(element, false);
const markup = renderer.read(Infinity);
return markup;
}

Expand All @@ -24,7 +24,7 @@ export function renderToString(element) {
* See https://reactjs.org/docs/react-dom-server.html#rendertostaticmarkup
*/
export function renderToStaticMarkup(element) {
var renderer = new ReactPartialRenderer(element, true);
var markup = renderer.read(Infinity);
const renderer = new ReactPartialRenderer(element, true);
const markup = renderer.read(Infinity);
return markup;
}
Loading