mirror of
https://github.com/RoboSats/robosats.git
synced 2025-01-18 20:21:35 +00:00
Prevent empty chat messages
This commit is contained in:
parent
6887eed6e3
commit
34a5340e06
@ -48,12 +48,14 @@ export default class Chat extends Component {
|
||||
}
|
||||
|
||||
onButtonClicked = (e) => {
|
||||
this.client.send(JSON.stringify({
|
||||
type: "message",
|
||||
message: this.state.value,
|
||||
nick: this.props.ur_nick,
|
||||
}));
|
||||
this.state.value = ''
|
||||
if(this.state.value!=''){
|
||||
this.client.send(JSON.stringify({
|
||||
type: "message",
|
||||
message: this.state.value,
|
||||
nick: this.props.ur_nick,
|
||||
}));
|
||||
this.state.value = ''
|
||||
}
|
||||
e.preventDefault();
|
||||
}
|
||||
|
||||
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user