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