Skip to content

Commit

Permalink
added forgoten check
Browse files Browse the repository at this point in the history
  • Loading branch information
danielnehrig committed Nov 9, 2020
1 parent 5a83403 commit 612e538
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions packages/babel-plugin-extract-messages/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -112,9 +112,11 @@ export default function({ types: t }) {
}

// Remove imports of i18nMark identity
node.specifiers = node.specifiers.filter(
specifier => specifier.imported.name !== "i18nMark"
)
node.specifiers = node.specifiers.filter(specifier => {
if (specifier.imported) {
return specifier.imported.name !== "i18nMark"
}
})

if (!node.specifiers.length) {
path.remove()
Expand Down

0 comments on commit 612e538

Please sign in to comment.