Skip to content
This repository has been archived by the owner on Sep 16, 2023. It is now read-only.

Commit

Permalink
Avoid throwing an error when no lodash package is found.
Browse files Browse the repository at this point in the history
  • Loading branch information
jdalton committed Nov 21, 2016
1 parent a4c19ee commit 33e503a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,10 @@ export default function lodash({ types }) {
const visitor = {
Program(path, state) {
const { ids } = _.assign(mapping, config(state.opts));
const file = path.hub.file;
const { file } = path.hub;

if (_.isEmpty(ids)) {
throw new Error('Cannot find module');
return;
}
// Clear tracked method imports.
importModule.cache.clear();
Expand Down

0 comments on commit 33e503a

Please sign in to comment.