mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
Fix some lint
This commit is contained in:
1 parent
1316160b86
commit
902b607f1f
2 files changed
+6
-6
No files matched your search
@@ -884,15 +884,16 @@ var ReactMount = {
|
||||
// will have occurred which will not be present in `markup`. Here,
|
||||
// insert markup into a <div> or <iframe> depending on the container
|
||||
// type to perform the same normalizations before comparing.
|
||||
var normalizer, normalizedMarkup;
|
||||
if (container.nodeType === ELEMENT_NODE_TYPE) {
|
||||
var normalizer = document.createElement('div');
|
||||
normalizer = document.createElement('div');
|
||||
normalizer.innerHTML = markup;
|
||||
var normalizedMarkup = normalizer.innerHTML;
|
||||
normalizedMarkup = normalizer.innerHTML;
|
||||
} else {
|
||||
var normalizer = document.createElement('iframe');
|
||||
normalizer = document.createElement('iframe');
|
||||
document.body.appendChild(normalizer);
|
||||
normalizer.contentDocument.write(markup);
|
||||
var normalizedMarkup = normalizer.contentDocument.documentElement.outerHTML;
|
||||
normalizedMarkup = normalizer.contentDocument.documentElement.outerHTML;
|
||||
}
|
||||
|
||||
var diffIndex = firstDifferenceIndex(normalizedMarkup, rootMarkup);
|
||||
|
||||
@@ -16,7 +16,6 @@ var mocks = require('mocks');
|
||||
describe('ReactMount', function() {
|
||||
var React = require('React');
|
||||
var ReactMount = require('ReactMount');
|
||||
var ReactMarkupChecksum = require('ReactMarkupChecksum');
|
||||
var ReactTestUtils = require('ReactTestUtils');
|
||||
var WebComponents = WebComponents;
|
||||
|
||||
@@ -170,7 +169,7 @@ describe('ReactMount', function() {
|
||||
expect(console.error.calls[0].args[0]).toContain(
|
||||
' (client) html entity: & client text</div>\n' +
|
||||
' (server) html entity: & server text</div>'
|
||||
)
|
||||
);
|
||||
});
|
||||
|
||||
if (WebComponents !== undefined) {
|
||||
|
||||
Reference in new issue
Block a user