stevenfukase hace 4 años
padre
commit
5a153a37f7
Se han modificado 1 ficheros con 2 adiciones y 2 borrados
  1. 2 2
      packages/app/src/components/Me/EditorSettings.tsx

+ 2 - 2
packages/app/src/components/Me/EditorSettings.tsx

@@ -155,9 +155,9 @@ const RuleListGroup: FC<RuleListGroupProps> = ({
   const { t } = useTranslation();
 
   const isCheckedRule = (ruleName: string) => (
-    textlintRules.filter(stateRule => (
+    textlintRules.find(stateRule => (
       stateRule.name === ruleName
-    ))[0]?.isEnabled
+    ))?.isEnabled || false
   );
 
   const ruleCheckboxHandler = (isChecked: boolean, ruleName: string) => {