Fix some lint
Eric O'Connell committed
Jul 9, 2015 at 13:41 UTC
902b607f1f3c91a51042dbdc0cf27ef11eb521da
2 files changed
+6
-6
src/renderers/dom/client/ReactMount.js
+5
-4
@@ -884,15 +884,16 @@ var ReactMount = {
884
// will have occurred which will not be present in `markup`. Here,
885
// insert markup into a <div> or <iframe> depending on the container
886
// type to perform the same normalizations before comparing.
887
+ var normalizer, normalizedMarkup;
888
if (container.nodeType === ELEMENT_NODE_TYPE) {
888
- var normalizer = document.createElement('div');
889
+ normalizer = document.createElement('div');
890
normalizer.innerHTML = markup;
890
- var normalizedMarkup = normalizer.innerHTML;
891
+ normalizedMarkup = normalizer.innerHTML;
892
} else {
892
- var normalizer = document.createElement('iframe');
893
+ normalizer = document.createElement('iframe');
894
document.body.appendChild(normalizer);
895
normalizer.contentDocument.write(markup);
895
- var normalizedMarkup = normalizer.contentDocument.documentElement.outerHTML;
896
+ normalizedMarkup = normalizer.contentDocument.documentElement.outerHTML;
897
}
898
899
var diffIndex = firstDifferenceIndex(normalizedMarkup, rootMarkup);
src/renderers/dom/client/__tests__/ReactMount-test.js
+1
-2
@@ -16,7 +16,6 @@ var mocks = require('mocks');
16
describe('ReactMount', function() {
17
var React = require('React');
18
var ReactMount = require('ReactMount');
19
- var ReactMarkupChecksum = require('ReactMarkupChecksum');
19
var ReactTestUtils = require('ReactTestUtils');
20
var WebComponents = WebComponents;
21
@@ -170,7 +169,7 @@ describe('ReactMount', function() {
169
expect(console.error.calls[0].args[0]).toContain(
170
' (client) html entity: & client text</div>\n' +
171
' (server) html entity: & server text</div>'
173
- )
172
+ );
173
});
174
175
if (WebComponents !== undefined) {