Skip to content

Commit

Permalink
fix(ts): main can be array
Browse files Browse the repository at this point in the history
i'll just ignore this for now lol
  • Loading branch information
Haroenv committed Jul 9, 2019
1 parent c9c6aec commit b619daa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/formatPkg.js
Original file line number Diff line number Diff line change
Expand Up @@ -403,7 +403,7 @@ function getTypes(pkg) {
}

const main = pkg.main || 'index.js';
if (main.endsWith('.js')) {
if (typeof main === 'string' && main.endsWith('.js')) {
const dtsMain = main.replace(/js$/, 'd.ts');
return {
ts: {
Expand Down

0 comments on commit b619daa

Please sign in to comment.