Skip to content

Commit

Permalink
Fix Flow issues in GlobResolver
Browse files Browse the repository at this point in the history
  • Loading branch information
marcins committed May 18, 2022
1 parent 2bc68c7 commit 925fec2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/resolvers/glob/src/GlobResolver.js
Expand Up @@ -100,12 +100,12 @@ export default (new Resolver({
loc: dependency.loc,
});

if (!result) {
if (!result || !result.filePath) {
throw errorToThrowableDiagnostic(
`Unable to resolve ${pkg} from ${dependency.sourcePath} when evaluating specifier ${specifier}`,
`Unable to resolve ${pkg} from ${sourceFile} when evaluating specifier ${specifier}`,
dependency,
);
} else if (result.diagnostics && result.diagnostics.length > 0) {
} else if (result.diagnostics) {
throw new ThrowableDiagnostic({diagnostic: result.diagnostics});
}

Expand Down

0 comments on commit 925fec2

Please sign in to comment.