link fe: support empty unmanaged groups

This commit is contained in:
Fang 2020-03-05 15:53:44 +01:00
parent c71e5315e9
commit 6966aa0df3
No known key found for this signature in database
GPG Key ID: EB035760C1BBA972

View File

@ -103,9 +103,9 @@ export class NewScreen extends Component {
return;
}
const target = aud.length === 0
? {group: state.groups[0]}
: {ships: aud};
const target = state.groups.length === 0
? {ships: aud}
: {group: state.groups[0]};
if (this.textarea) {
this.textarea.value = '';