Skip to content

Commit

Permalink
fix(content-picker): fix create folder request (#3919)
Browse files Browse the repository at this point in the history
  • Loading branch information
tjiang-box authored Feb 11, 2025
1 parent c61e1c9 commit 2392641
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/elements/content-picker/ContentPicker.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ import {
DEFAULT_SEARCH_DEBOUNCE,
DEFAULT_VIEW_FILES,
DEFAULT_VIEW_RECENTS,
ERROR_CODE_ITEM_NAME_IN_USE,
ERROR_CODE_ITEM_NAME_INVALID,
ERROR_CODE_ITEM_NAME_TOO_LONG,
FIELD_NAME,
Expand Down Expand Up @@ -818,9 +817,9 @@ class ContentPicker extends Component<Props, State> {
() => {
this.fetchFolder(id);
},
({ response: { status } }) => {
({ code }) => {
this.setState({
errorCode: status === 409 ? ERROR_CODE_ITEM_NAME_IN_USE : ERROR_CODE_ITEM_NAME_INVALID,
errorCode: code,
isLoading: false,
});
},
Expand Down

0 comments on commit 2392641

Please sign in to comment.