From 3853142167bc7dcc5ea04474f9bc6c5fb0d9b06b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=B2=20Ribaudo?= Date: Thu, 25 Jan 2024 16:07:26 +0100 Subject: [PATCH] Fix ts error --- packages/babel-plugin-polyfill-corejs2/src/helpers.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/babel-plugin-polyfill-corejs2/src/helpers.ts b/packages/babel-plugin-polyfill-corejs2/src/helpers.ts index 001b99b1..07a3912b 100644 --- a/packages/babel-plugin-polyfill-corejs2/src/helpers.ts +++ b/packages/babel-plugin-polyfill-corejs2/src/helpers.ts @@ -9,6 +9,8 @@ export function hasMinVersion( // that the built output will include all definitions. if (!runtimeVersion || !minVersion) return true; + runtimeVersion = String(runtimeVersion); + // semver.intersects() has some surprising behavior with comparing ranges // with preprelease versions. We add '^' to ensure that we are always // comparing ranges with ranges, which sidesteps this logic.