babel-preset-gatsby
Advanced tools
Comparing version 0.3.5 to 0.3.6
@@ -6,2 +6,8 @@ # Change Log | ||
## [0.3.6](https://github.com/gatsbyjs/gatsby/compare/babel-preset-gatsby@0.3.5...babel-preset-gatsby@0.3.6) (2020-04-24) | ||
### Bug Fixes | ||
- **optimize-hook-destructuring:** handle skipped items ([#23438](https://github.com/gatsbyjs/gatsby/issues/23438)) ([2cf2dc5](https://github.com/gatsbyjs/gatsby/commit/2cf2dc5)) | ||
## [0.3.5](https://github.com/gatsbyjs/gatsby/compare/babel-preset-gatsby@0.3.4...babel-preset-gatsby@0.3.5) (2020-04-24) | ||
@@ -8,0 +14,0 @@ |
@@ -38,3 +38,9 @@ "use strict"; | ||
if (!(onlyBuiltIns ? isBuiltInHook : isHook).test(hookName)) return; | ||
path.parent.id = t.objectPattern(path.parent.id.elements.map((element, i) => t.objectProperty(t.numericLiteral(i), element))); | ||
path.parent.id = t.objectPattern(path.parent.id.elements.reduce((acc, element, i) => { | ||
if (element) { | ||
acc.push(t.objectProperty(t.numericLiteral(i), element)); | ||
} | ||
return acc; | ||
}, [])); | ||
} | ||
@@ -41,0 +47,0 @@ |
{ | ||
"name": "babel-preset-gatsby", | ||
"version": "0.3.5", | ||
"version": "0.3.6", | ||
"author": "Philipp Spiess <hello@philippspiess.com>", | ||
@@ -45,3 +45,3 @@ "repository": { | ||
}, | ||
"gitHead": "35154266b55896fb6bf678d8b0ac61e8470dcbf5" | ||
"gitHead": "c67221403d005b0e580868937476abdc7378d243" | ||
} |
25892
157
291010