Skip to content

Commit

Permalink
includes -> indexof for node 4
Browse files Browse the repository at this point in the history
  • Loading branch information
Maxim-Mazurok committed Jun 5, 2020
1 parent 38cd8ea commit cd7e431
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/ExportMap.js
Original file line number Diff line number Diff line change
Expand Up @@ -548,7 +548,7 @@ ExportMap.parse = function (path, content, context) {
isEsModuleInteropTrue && exports.push('TSNamespaceExportDeclaration')

// This doesn't declare anything, but changes what's being exported.
if (exports.includes(n.type)) {
if (exports.indexOf(n.type) !== 0) {
const exportedName = n.expression && n.expression.name || n.id.name
const declTypes = [
'VariableDeclaration',
Expand All @@ -561,7 +561,7 @@ ExportMap.parse = function (path, content, context) {
'TSModuleDeclaration',
]
const exportedDecls = ast.body.filter(({ type, id, declarations }) =>
declTypes.includes(type) &&
declTypes.indexOf(type) !== 0 &&
(
(id && id.name === exportedName) ||
(declarations && declarations.find(d => d.id.name === exportedName))
Expand Down

0 comments on commit cd7e431

Please sign in to comment.