Shun Miyazawa 4 лет назад
Родитель
Сommit
5b59d40540
1 измененных файлов с 3 добавлено и 2 удалено
  1. 3 2
      packages/app/src/components/Admin/Security/SecuritySetting.jsx

+ 3 - 2
packages/app/src/components/Admin/Security/SecuritySetting.jsx

@@ -4,7 +4,7 @@ import PropTypes from 'prop-types';
 import { Collapse } from 'reactstrap';
 import { Collapse } from 'reactstrap';
 import { withTranslation } from 'react-i18next';
 import { withTranslation } from 'react-i18next';
 
 
-import { validateDeleteConfigs } from '~/utils/page-delete-config';
+import { validateDeleteConfigs, prepareDeleteConfigValuesForCalc } from '~/utils/page-delete-config';
 import { withUnstatedContainers } from '../../UnstatedUtils';
 import { withUnstatedContainers } from '../../UnstatedUtils';
 import { toastSuccess, toastError } from '~/client/util/apiNotification';
 import { toastSuccess, toastError } from '~/client/util/apiNotification';
 import { PageDeleteConfigValue } from '~/interfaces/page-delete-config';
 import { PageDeleteConfigValue } from '~/interfaces/page-delete-config';
@@ -131,7 +131,8 @@ class SecuritySetting extends React.Component {
     }
     }
 
 
     const [recursiveState, setRecursiveState] = this.getRecursiveDeletionConfigState(deletionType);
     const [recursiveState, setRecursiveState] = this.getRecursiveDeletionConfigState(deletionType);
-    const shouldForceUpdate = !validateDeleteConfigs(newState, recursiveState);
+    const calculableValue = prepareDeleteConfigValuesForCalc(newState, recursiveState);
+    const shouldForceUpdate = !validateDeleteConfigs(calculableValue[0], calculableValue[1]);
     if (shouldForceUpdate) {
     if (shouldForceUpdate) {
       setRecursiveState(newState);
       setRecursiveState(newState);
       this.setExpantOtherDeleteOptionsState(deletionType, true);
       this.setExpantOtherDeleteOptionsState(deletionType, true);