Skip to content

Commit 0be9bcd

Browse files
committed
includes -> indexof for node 4
1 parent 38cd8ea commit 0be9bcd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/ExportMap.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -548,7 +548,7 @@ ExportMap.parse = function (path, content, context) {
548548
isEsModuleInteropTrue && exports.push('TSNamespaceExportDeclaration')
549549

550550
// This doesn't declare anything, but changes what's being exported.
551-
if (exports.includes(n.type)) {
551+
if (exports.indexOf(n.type) !== -1) {
552552
const exportedName = n.expression && n.expression.name || n.id.name
553553
const declTypes = [
554554
'VariableDeclaration',
@@ -561,7 +561,7 @@ ExportMap.parse = function (path, content, context) {
561561
'TSModuleDeclaration',
562562
]
563563
const exportedDecls = ast.body.filter(({ type, id, declarations }) =>
564-
declTypes.includes(type) &&
564+
declTypes.indexOf(type) !== -1 &&
565565
(
566566
(id && id.name === exportedName) ||
567567
(declarations && declarations.find(d => d.id.name === exportedName))

0 commit comments

Comments
 (0)