From 30b1f607879d058bcc8522749ffb0797cddfb863 Mon Sep 17 00:00:00 2001 From: Chris Steele Date: Mon, 9 Jun 2025 17:27:25 +0100 Subject: [PATCH] Prevent error when local plugin not found --- lib/integration/Plugin.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/integration/Plugin.js b/lib/integration/Plugin.js index d1ed72f..6653fa3 100644 --- a/lib/integration/Plugin.js +++ b/lib/integration/Plugin.js @@ -289,6 +289,8 @@ export default class Plugin { return await perform() } const getMatchingVersion = async () => { + if (!this.isPresent) return null + if (this.isLocalSource) { const info = this.projectVersion ? this._projectInfo : this._sourceInfo const satisfiesConstraint = !this.hasValidRequestVersion || semver.satisfies(info.version, this.requestedVersion, semverOptions) @@ -297,8 +299,6 @@ export default class Plugin { return info.version } - if (!this.isPresent) return null - // check if the latest version is compatible const satisfiesConstraint = !this.hasValidRequestVersion || semver.satisfies(this._sourceInfo.version, this.requestedVersion, semverOptions) const satisfiesFramework = semver.satisfies(framework, this.frameworkVersion, semverOptions)