Skip to content

Commit

Permalink
Fix some typos in dumpReactTree.js (facebook#19636)
Browse files Browse the repository at this point in the history
Summary:
Simple doc fixes
Closes facebook#19636

Differential Revision: D8344481

Pulled By: TheSavior

fbshipit-source-id: b6fa064f70793bdaf1d6346b2775373b74c2ae3b
  • Loading branch information
felixonmars authored and macdoum1 committed Jun 28, 2018
1 parent b097bdf commit 41caaf0
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions Libraries/BugReporting/dumpReactTree.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,14 +51,14 @@ function getReactTree() {
}

/*
function dumpNode(node: Object, identation: number) {
function dumpNode(node: Object, indentation: number) {
const data = getReactData(node);
if (data.nodeType === 'Text') {
return indent(identation) + data.text + '\n';
return indent(indentation) + data.text + '\n';
} else if (data.nodeType === 'Empty') {
return '';
}
let output = indent(identation) + `<${data.name}`;
let output = indent(indentation) + `<${data.name}`;
if (data.nodeType === 'Composite') {
for (const propName of Object.getOwnPropertyNames(data.props || {})) {
if (isNormalProp(propName)) {
Expand All @@ -76,11 +76,11 @@ function dumpNode(node: Object, identation: number) {
}
let childOutput = '';
for (const child of data.children || []) {
childOutput += dumpNode(child, identation + 1);
childOutput += dumpNode(child, indentation + 1);
}
if (childOutput) {
output += '>\n' + childOutput + indent(identation) + `</${data.name}>\n`;
output += '>\n' + childOutput + indent(indentation) + `</${data.name}>\n`;
} else {
output += ' />\n';
}
Expand Down

0 comments on commit 41caaf0

Please sign in to comment.