diff --git a/src/parser.ts b/src/parser.ts index 9f656db2..4ebb0c5d 100644 --- a/src/parser.ts +++ b/src/parser.ts @@ -793,6 +793,9 @@ export class Parser { const defaultProps = possibleDefaultProps[0]; let initializer = (defaultProps as ts.PropertyDeclaration).initializer; + if (!initializer) { + return res; + } let properties = (initializer as ts.ObjectLiteralExpression).properties; while (ts.isIdentifier(initializer as ts.Identifier)) {