Skip to content

Commit e67be8f

Browse files
authored
Fix: Prevent error when local plugin not found (fixes #220)
1 parent 291b63a commit e67be8f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/integration/Plugin.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -289,6 +289,8 @@ export default class Plugin {
289289
return await perform()
290290
}
291291
const getMatchingVersion = async () => {
292+
if (!this.isPresent) return null
293+
292294
if (this.isLocalSource) {
293295
const info = this.projectVersion ? this._projectInfo : this._sourceInfo
294296
const satisfiesConstraint = !this.hasValidRequestVersion || semver.satisfies(info.version, this.requestedVersion, semverOptions)
@@ -297,8 +299,6 @@ export default class Plugin {
297299
return info.version
298300
}
299301

300-
if (!this.isPresent) return null
301-
302302
// check if the latest version is compatible
303303
const satisfiesConstraint = !this.hasValidRequestVersion || semver.satisfies(this._sourceInfo.version, this.requestedVersion, semverOptions)
304304
const satisfiesFramework = semver.satisfies(framework, this.frameworkVersion, semverOptions)

0 commit comments

Comments
 (0)