Fix tests
parent
dc0fbf7822
commit
dd792a2b22
|
@ -2204,7 +2204,8 @@ function printFunctionParams(path, print, options) {
|
|||
// b,
|
||||
// c
|
||||
// }) {}
|
||||
if (fun.params.length === 1 &&
|
||||
if (fun.params &&
|
||||
fun.params.length === 1 &&
|
||||
!fun.params[0].comments &&
|
||||
(fun.params[0].type === "ObjectPattern" ||
|
||||
fun.params[0].type === "FunctionTypeParam" &&
|
||||
|
|
|
@ -13,16 +13,14 @@ exports[`flow_object_comment.js 1`] = `
|
|||
},
|
||||
) => {}
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
export default (
|
||||
{
|
||||
export default ({
|
||||
foo,
|
||||
bar
|
||||
}: {
|
||||
}: {
|
||||
// comment
|
||||
foo?: Object,
|
||||
// comment 2
|
||||
bar?: Object
|
||||
}
|
||||
) => {};
|
||||
}) => {};
|
||||
"
|
||||
`;
|
||||
|
|
Loading…
Reference in New Issue