Skip to content

Commit

Permalink
fix: Module doesn't resolve the default prop.
Browse files Browse the repository at this point in the history
closes #22
  • Loading branch information
mrsteele committed Jul 20, 2016
1 parent 6c4b6a8 commit fd984de
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

let JSONTruncate
try {
JSONTruncate = require('./dist/json-truncate')
JSONTruncate = require('./dist/json-truncate').default
} catch (err) {
if (err.code === 'MODULE_NOT_FOUND') {
require('babel-register')
JSONTruncate = require('./src/json-truncate')
JSONTruncate = require('./src/json-truncate').default
} else {
console.log(err)
process.exit(1)
Expand Down
2 changes: 1 addition & 1 deletion test/mocha.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ const createTestsFor = (m, name) => {

describe('entry', () => {
it('should load either the source or the dist', () => {
entry.default.should.be.oneOf([src, dist])
entry.should.be.oneOf([src, dist])
})
})

Expand Down

0 comments on commit fd984de

Please sign in to comment.