Skip to content

Commit

Permalink
Properly fix component-indexof require.
Browse files Browse the repository at this point in the history
  • Loading branch information
ockham committed Mar 31, 2016
1 parent b213677 commit d995489
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
6 changes: 5 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,11 @@
* Module dependencies.
*/

var index = require('component-indexof');
try {
var index = require('indexof');
} catch (err) {
var index = require('component-indexof');
}

/**
* Whitespace regexp.
Expand Down
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@
"dependencies": {
"component-indexof": "0.0.3"
},
"browser": {
"indexof": "component-indexof"
},
"component": {
"scripts": {
"classes/index.js": "index.js"
Expand Down

0 comments on commit d995489

Please sign in to comment.