Skip to content

Commit

Permalink
changed toNumber to parseFloat #5447 (#5448)
Browse files Browse the repository at this point in the history
Co-authored-by: Steve Piercy <[email protected]>
  • Loading branch information
Shibbu264 and stevepiercy authored Nov 27, 2023
1 parent fa89d4f commit 5f845b8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions news/5448.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Replaced `toNumber` with `parseFloat` to avoid an error when validating the `plone.restapi` version. @shibbu264
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -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, {
Expand Down

0 comments on commit 5f845b8

Please sign in to comment.