Skip to content

Commit

Permalink
Fix: スマホでサークル一覧が選択できない問題 (#509)
Browse files Browse the repository at this point in the history
  • Loading branch information
kmycode authored Jan 26, 2024
1 parent 3762dd6 commit a7954d0
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ class CircleDropdown extends PureComponent {
this.props.onModalClose();
} else {
this.props.onModalOpen({
actions: this.options.map(option => ({ ...option, active: option.value === this.props.circleId })),
actions: this.options && this.options.map(option => ({ ...option, active: option.value === this.props.circleId })),
onClick: this.handleModalActionClick,
});
}
Expand Down Expand Up @@ -232,6 +232,7 @@ class CircleDropdown extends PureComponent {
return circle[1] ? { value: circle[1].get('id'), text: circle[1].get('title') } : null;
}).filter((opt) => opt !== null);
const listOption = listOptions.find((opt) => opt.value === circleId) ?? { value: '0', text: 'Unselected' };
this.options = listOptions;

return (
<div ref={this.setTargetRef} onKeyDown={this.handleKeyDown}>
Expand Down

0 comments on commit a7954d0

Please sign in to comment.