Fix lookAtDirection prop passed to Mascot (#9343)

feature/default_network_editable
Whymarrh Whitby 4 years ago committed by GitHub
parent a6e93a6344
commit 9a711e695a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      ui/app/components/ui/mascot/mascot.component.js

@ -30,7 +30,7 @@ export default class Mascot extends Component {
height: '200',
followMouse: true,
lookAtTarget: {},
lookAtDirection: '',
lookAtDirection: null,
}
constructor (props) {
@ -81,7 +81,7 @@ export default class Mascot extends Component {
}
componentDidUpdate (prevProps) {
const { lookAtTarget: prevTarget = {}, lookAtDirection: prevDirection = '', followMouse: prevFollowMouse } = prevProps
const { lookAtTarget: prevTarget = {}, lookAtDirection: prevDirection = null, followMouse: prevFollowMouse } = prevProps
const { lookAtTarget = {}, followMouse, lookAtDirection } = this.props
if (lookAtDirection && prevDirection !== lookAtDirection) {

Loading…
Cancel
Save