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

Commit a0c1916

Browse files
committed
Avoid throwing an error when no lodash package is found.
1 parent 1ad7b5b commit a0c1916

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,10 @@ export default function lodash({ types }) {
4848
const visitor = {
4949
Program(path, state) {
5050
const { ids } = _.assign(mapping, config(state.opts));
51-
const file = path.hub.file;
51+
const { file } = path.hub;
5252

5353
if (_.isEmpty(ids)) {
54-
throw new Error('Cannot find module');
54+
return;
5555
}
5656
// Clear tracked method imports.
5757
importModule.cache.clear();

0 commit comments

Comments
 (0)