Skip to content

Commit

Permalink
fix bug 71024
Browse files Browse the repository at this point in the history
  • Loading branch information
sekiju committed Oct 22, 2024
1 parent 11b3381 commit bad7d7e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion apps/documenteditor/mobile/src/view/Encoding.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const PageEncoding = props => {
const { t } = useTranslation();
const _t = t("Settings", { returnObjects: true });
const encodeData = props.encodeData;
const [stateEncoding, setStateEncoding] = useState(props.valueEncoding);
const [stateEncoding, setStateEncoding] = useState(props.valueEncoding === -1 ? encodeData.find(encoding => encoding.lcid === 65001).value : props.valueEncoding);
const getIndexNameEncoding = () => encodeData.findIndex(encoding => encoding.value === stateEncoding);
const nameEncoding = encodeData[getIndexNameEncoding()].displayValue;
const mode = props.mode;
Expand Down
2 changes: 1 addition & 1 deletion apps/spreadsheeteditor/mobile/src/view/Encoding.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const PageEncoding = props => {
const encodeData = props.encodeData;
const valuesDelimeter = props.valuesDelimeter;
const namesDelimeter = props.namesDelimeter;
const [stateEncoding, setStateEncoding] = useState(props.valueEncoding);
const [stateEncoding, setStateEncoding] = useState(props.valueEncoding === -1 ? encodeData.find(encoding => encoding.lcid === 65001).value : props.valueEncoding);
const [stateDelimeter, setStateDelimeter] = useState(props.valueDelimeter);
const getIndexNameEncoding = () => encodeData.findIndex(encoding => encoding.value === stateEncoding);
const nameEncoding = encodeData[getIndexNameEncoding()].displayValue;
Expand Down

0 comments on commit bad7d7e

Please sign in to comment.