mirror of
https://github.com/status-im/consul.git
synced 2025-01-10 22:06:20 +00:00
Handle case when this.element is undefined outlet
This commit is contained in:
parent
ef83c0799f
commit
a6e4239e7d
@ -79,10 +79,14 @@ export default class Outlet extends Component {
|
|||||||
this.previousState = this.state;
|
this.previousState = this.state;
|
||||||
this.state = new State('loading');
|
this.state = new State('loading');
|
||||||
this.endTransition = this.routlet.transition();
|
this.endTransition = this.routlet.transition();
|
||||||
// if we have no transition-duration set immediately end the transition
|
let duration;
|
||||||
const duration = window
|
if (this.element) {
|
||||||
.getComputedStyle(this.element)
|
// if we have no transition-duration set immediately end the transition
|
||||||
.getPropertyValue('transition-duration');
|
duration = window.getComputedStyle(this.element).getPropertyValue('transition-duration');
|
||||||
|
} else {
|
||||||
|
duration = 0;
|
||||||
|
}
|
||||||
|
|
||||||
if (parseFloat(duration) === 0) {
|
if (parseFloat(duration) === 0) {
|
||||||
this.endTransition();
|
this.endTransition();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user