瀏覽代碼

Merge pull request #6181 from weseek/fix/98952-basic-info-radio-button-behavior

Fix/98952 basic info radio button behavior
cao 3 年之前
父節點
當前提交
7adf8b3636
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      packages/app/src/components/Me/BasicInfoSettings.tsx

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

@@ -91,7 +91,7 @@ const BasicInfoSettings = (props: Props) => {
               id="radioEmailShow"
               className="custom-control-input"
               name="userForm[isEmailPublished]"
-              checked={personalSettingsInfo?.isEmailPublished || true}
+              checked={personalSettingsInfo?.isEmailPublished === true}
               onChange={() => changePersonalSettingsHandler({ isEmailPublished: true })}
             />
             <label className="custom-control-label" htmlFor="radioEmailShow">{t('Show')}</label>
@@ -102,7 +102,7 @@ const BasicInfoSettings = (props: Props) => {
               id="radioEmailHide"
               className="custom-control-input"
               name="userForm[isEmailPublished]"
-              checked={!personalSettingsInfo?.isEmailPublished || false}
+              checked={personalSettingsInfo?.isEmailPublished === false}
               onChange={() => changePersonalSettingsHandler({ isEmailPublished: false })}
             />
             <label className="custom-control-label" htmlFor="radioEmailHide">{t('Hide')}</label>