Skip to content
This repository has been archived by the owner on Jan 14, 2020. It is now read-only.

Commit

Permalink
fix: don't inject initialDataKey to object decomposition
Browse files Browse the repository at this point in the history
This is a fix for babel plugin addInitialDataKey. Fixes #119.
  • Loading branch information
IlyaSemenov committed Oct 11, 2018
1 parent 2c2240e commit cce861f
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/babel/addInitialDataKey.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ module.exports = ({ types: t }) => ({
) {
if (
path.node.key.name !== 'getInitialData' ||
path.parentPath.isObjectPattern() ||
hasDataKey(path.parent.properties)
) {
return
Expand Down

0 comments on commit cce861f

Please sign in to comment.