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:
parent
a6e93a6344
commit
9a711e695a
@ -30,7 +30,7 @@ export default class Mascot extends Component {
|
|||||||
height: '200',
|
height: '200',
|
||||||
followMouse: true,
|
followMouse: true,
|
||||||
lookAtTarget: {},
|
lookAtTarget: {},
|
||||||
lookAtDirection: '',
|
lookAtDirection: null,
|
||||||
}
|
}
|
||||||
|
|
||||||
constructor (props) {
|
constructor (props) {
|
||||||
@ -81,7 +81,7 @@ export default class Mascot extends Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
componentDidUpdate (prevProps) {
|
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
|
const { lookAtTarget = {}, followMouse, lookAtDirection } = this.props
|
||||||
|
|
||||||
if (lookAtDirection && prevDirection !== lookAtDirection) {
|
if (lookAtDirection && prevDirection !== lookAtDirection) {
|
||||||
|
Loading…
Reference in New Issue
Block a user