From cd5d9f51290e34bfdd306c596e967752bb7ff984 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=86=AF=E4=B8=B9=E8=90=8D?= Date: Wed, 24 Jan 2024 11:08:03 +0800 Subject: [PATCH] feat: add @garfish/bridge-react support react v18 --- packages/bridge-react/src/reactBridge.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/bridge-react/src/reactBridge.ts b/packages/bridge-react/src/reactBridge.ts index a77532d16..3c3649641 100644 --- a/packages/bridge-react/src/reactBridge.ts +++ b/packages/bridge-react/src/reactBridge.ts @@ -69,7 +69,7 @@ export function reactBridge(this: any, userOptions: Options) { } if (!checkReactVersion(opts.React)) { throw Error( - 'Please make sure than the react version is higher than or equal to v16 and lower than v18.', + 'Please make sure than the react version is between v16 and v18.', ); } @@ -185,7 +185,7 @@ function checkReactVersion(React: typeReact) { const majorVersionString = React.version.split('.')[0]; try { return ( - Number(majorVersionString) >= 16 && Number(majorVersionString) < 18 + Number(majorVersionString) >= 16 && Number(majorVersionString) <= 18 ); } catch (err) { return false;