mirror of
https://github.com/RoboSats/robosats.git
synced 2025-01-31 10:31: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) => {
|
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
Loading…
Reference in New Issue
Block a user