Skip to content

Commit 6a52ce7

Browse files
ClearlyClairehiyuki2578
authored andcommitted
Disable list title validation button when list title is empty (mastodon#11475)
1 parent 80d2bb2 commit 6a52ce7

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

app/javascript/mastodon/features/list_editor/components/edit_list_form.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ const messages = defineMessages({
1111

1212
const mapStateToProps = state => ({
1313
value: state.getIn(['listEditor', 'title']),
14-
disabled: !state.getIn(['listEditor', 'isChanged']),
14+
disabled: !state.getIn(['listEditor', 'isChanged']) || !state.getIn(['listEditor', 'title']),
1515
});
1616

1717
const mapDispatchToProps = dispatch => ({

app/javascript/mastodon/features/lists/components/new_list_form.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ class NewListForm extends React.PureComponent {
6666
</label>
6767

6868
<IconButton
69-
disabled={disabled}
69+
disabled={disabled || !value}
7070
icon='plus'
7171
title={title}
7272
onClick={this.handleClick}

0 commit comments

Comments
 (0)