Skip to content

Commit

Permalink
fix: project info edit labels bug
Browse files Browse the repository at this point in the history
  • Loading branch information
hujiahao-hjh committed Nov 7, 2023
1 parent f6ba1a0 commit 21f1794
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -471,7 +471,7 @@ const Info = () => {

<FormModal
onOk={({ labels, ...result }) => {
updatePrj({ ...result, labels: labels?.split(',') }).then(() => {
updatePrj({ ...result, labels: (Array.isArray(labels) ? labels : labels?.split(',')) || [] }).then(() => {
updater.projectInfoEditVisible(false);
updater.projectInfoSaveDisabled(true);
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,9 @@ class SectionInfoEdit extends React.Component<IProps, IState> {
};

handleSubmit = ({ labels, ...rest }: Obj) => {
return Promise.resolve(this.props.updateInfo({ ...rest, labels: labels ? labels.split(',') : [] })).then(() => {
return Promise.resolve(
this.props.updateInfo({ ...rest, labels: (Array.isArray(labels) ? labels : labels?.split(',')) || [] }),
).then(() => {
this.toggleModal();
});
};
Expand Down

0 comments on commit 21f1794

Please sign in to comment.