pretty-format
Advanced tools
Comparing version 18.5.0-alpha.7da3df39 to 19.0.0
@@ -7,2 +7,4 @@ /** | ||
* of patent rights can be found in the PATENTS file in the same directory. | ||
* | ||
* | ||
*/ | ||
@@ -16,2 +18,11 @@ /* eslint-disable max-len */ | ||
// Child can be `number` in Stack renderer but not in Fiber renderer. | ||
function printChildren(children, print, indent, colors, opts) { | ||
@@ -45,10 +56,12 @@ return children.map(child => printInstance(child, print, indent, colors, opts)).join(opts.edgeSpacing); | ||
let closeInNewLine = false; | ||
let result = colors.tag.open + '<' + instance.type + colors.tag.close; | ||
if (instance.props) { | ||
// If assignments are in opposite order, Flow 0.39.0 finds incorrect error: | ||
// element of Object.keys. Expected object instead of possibly undefined value | ||
closeInNewLine = !!Object.keys(instance.props).length && !opts.min; | ||
result += printProps(instance.props, print, indent, colors, opts); | ||
} | ||
const closeInNewLine = !!Object.keys(instance.props).length && !opts.min; | ||
if (instance.children) { | ||
@@ -55,0 +68,0 @@ const children = printChildren(instance.children, print, indent, colors, opts); |
{ | ||
"name": "pretty-format", | ||
"version": "18.5.0-alpha.7da3df39", | ||
"version": "19.0.0", | ||
"repository": { | ||
@@ -5,0 +5,0 @@ "type": "git", |
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
288007
1814
1