diff --git a/news/5448.bugfix b/news/5448.bugfix new file mode 100644 index 0000000000..0420717612 --- /dev/null +++ b/news/5448.bugfix @@ -0,0 +1 @@ +Replaced `toNumber` with `parseFloat` to avoid an error when validating the `plone.restapi` version. @shibbu264 \ No newline at end of file diff --git a/src/components/manage/Controlpanels/Users/UserGroupMembershipControlPanel.jsx b/src/components/manage/Controlpanels/Users/UserGroupMembershipControlPanel.jsx index 1bec237e41..6195610e7f 100644 --- a/src/components/manage/Controlpanels/Users/UserGroupMembershipControlPanel.jsx +++ b/src/components/manage/Controlpanels/Users/UserGroupMembershipControlPanel.jsx @@ -3,7 +3,7 @@ * TODO Enrich with features of user control panel. Then replace user control panel. */ import React, { useEffect } from 'react'; -import { find, toNumber } from 'lodash'; +import { find } from 'lodash'; import { Portal } from 'react-portal'; import { useHistory } from 'react-router'; import { Link, useLocation } from 'react-router-dom'; @@ -38,7 +38,7 @@ const UserGroupMembershipPanel = () => { (state) => state.controlpanels.systeminformation, ); const can_use_group_membership_panel = systeminformation - ? toNumber(systeminformation?.plone_restapi_version.slice(0, 4)) >= 8.24 + ? parseFloat(systeminformation?.plone_restapi_version.slice(0, 4)) >= 8.24 : false; const actions = useSelector((state) => state.actions?.actions ?? {}); const ploneSetupAction = find(actions.user, {