Search not to fiddle with URL to fix render() triggering

This commit is contained in:
James Barnsley
2018-06-15 08:56:17 +12:00
parent 7a94320d80
commit b72c77f4f8
9 changed files with 23032 additions and 21096 deletions

View File

@ -36,12 +36,12 @@ class Settings extends React.Component {
}
}
componentWillReceiveProps(newProps){
componentWillReceiveProps(nextProps){
var changed = false
var state = this.state
if (newProps.pusher.username != this.state.pusher_username && this.state.input_in_focus != 'pusher_username'){
state.pusher_username = newProps.pusher.username
if (nextProps.pusher.username != this.state.pusher_username && this.state.input_in_focus != 'pusher_username'){
state.pusher_username = nextProps.pusher.username
changed = true
}