diff --git a/src/plugins.ts b/src/plugins.ts index 79efe041..0febf02f 100644 --- a/src/plugins.ts +++ b/src/plugins.ts @@ -383,7 +383,7 @@ export default class Plugins { // a not valid tag indicates that it's a dist-tag like 'latest' if (!valid(p.tag)) return `${p.name}@${p.tag}` - if (p.tag && valid(p.tag) && jitPlugins[p.name] && gt(p.tag, jitPlugins[p.name])) { + if (p.tag && valid(p.tag) && jitPlugins[p.name] && valid(jitPlugins[p.name]) && gt(p.tag, jitPlugins[p.name])) { // The user has installed a version of the JIT plugin that is newer than the one // specified by the root plugin's JIT configuration. In this case, we want to // keep the version installed by the user.