Skip to content

Commit

Permalink
feat: add @garfish/bridge-react support react v18
Browse files Browse the repository at this point in the history
  • Loading branch information
danpeen committed Jan 24, 2024
1 parent 029766d commit cd5d9f5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/bridge-react/src/reactBridge.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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.',
);
}

Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit cd5d9f5

Please sign in to comment.