Skip to content

Commit

Permalink
chore: typo
Browse files Browse the repository at this point in the history
  • Loading branch information
59naga committed Jul 2, 2018
1 parent 4d29040 commit e5b35d4
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/index.js
Expand Up @@ -40,8 +40,8 @@ module.exports = ({template, types}) => {
class ExportFinder {
constructor (path) {
this.path = path
this.hasExportDefault = false
this.hasExportNamed = false
this.hasExportsDefault = false
this.hasExportsNamed = false
this.hasModuleExports = false
}
getRootPath () {
Expand All @@ -57,7 +57,7 @@ class ExportFinder {
}
}
})
return this.hasExportDefault && !this.hasExportNamed && !this.hasModuleExports
return this.hasExportsDefault && !this.hasExportsNamed && !this.hasModuleExports
}
findExport (path, property = 'expression') {
// Not `exports.anything`, skip
Expand All @@ -69,9 +69,9 @@ class ExportFinder {
const propertyName = path.get(`${property}.left.property.name`).node
if (objectName === 'exports') {
if (propertyName === 'default') {
this.hasExportDefault = true
this.hasExportsDefault = true
} else {
this.hasExportNamed = true
this.hasExportsNamed = true
}
}
if (`${objectName}.${propertyName}` === 'module.exports') {
Expand Down

0 comments on commit e5b35d4

Please sign in to comment.