diff --git a/lib/babel/addInitialDataKey.js b/lib/babel/addInitialDataKey.js index a5fb9f6..b7637c1 100644 --- a/lib/babel/addInitialDataKey.js +++ b/lib/babel/addInitialDataKey.js @@ -19,6 +19,7 @@ module.exports = ({ types: t }) => ({ ) { if ( path.node.key.name !== 'getInitialData' || + path.parentPath.isObjectPattern() || hasDataKey(path.parent.properties) ) { return