1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-23 09:52:26 +01:00

Fix lookAtDirection prop passed to Mascot (#9343)

This commit is contained in:
Whymarrh Whitby 2020-09-02 12:37:39 -02:30 committed by GitHub
parent a6e93a6344
commit 9a711e695a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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) {