From f7bbc09810071a857571fc10c9ed2f585236a7b0 Mon Sep 17 00:00:00 2001 From: Rich Harris Date: Tue, 28 Feb 2017 12:33:38 -0500 Subject: [PATCH] oops --- src/generators/Generator.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/generators/Generator.js b/src/generators/Generator.js index ef5eda8d46..6737f1f99a 100644 --- a/src/generators/Generator.js +++ b/src/generators/Generator.js @@ -70,7 +70,7 @@ export default class Generator { else { // handle shorthand properties - if ( parent.type === 'Property' && parent.shorthand ) { + if ( parent && parent.type === 'Property' && parent.shorthand ) { if ( key === 'key' ) { code.appendLeft( node.start, `${name}: ` ); return;