mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-09 03:15:11 +00:00
Bug 1464849: Avoid to render the graph in case of animation was removed. r=gl
MozReview-Commit-ID: HREpfImDKum --HG-- extra : rebase_source : 1b9e0ee2b81fd291bc9d7bbb248ccbfa61b114e2
This commit is contained in:
parent
1b8f9ac1a6
commit
b8501fd3a3
@ -184,17 +184,15 @@ class SummaryGraphPath extends Component {
|
|||||||
|
|
||||||
render() {
|
render() {
|
||||||
const { durationPerPixel, keyframesList } = this.state;
|
const { durationPerPixel, keyframesList } = this.state;
|
||||||
|
const { animation, simulateAnimation, timeScale } = this.props;
|
||||||
|
|
||||||
if (!durationPerPixel) {
|
if (!durationPerPixel || !animation.state.type) {
|
||||||
|
// Undefined animation.state.type means that the animation had been removed already.
|
||||||
|
// Even if the animation was removed, we still need the empty svg since the
|
||||||
|
// component might be re-used.
|
||||||
return dom.svg();
|
return dom.svg();
|
||||||
}
|
}
|
||||||
|
|
||||||
const {
|
|
||||||
animation,
|
|
||||||
simulateAnimation,
|
|
||||||
timeScale,
|
|
||||||
} = this.props;
|
|
||||||
|
|
||||||
const { createdTime, playbackRate } = animation.state;
|
const { createdTime, playbackRate } = animation.state;
|
||||||
|
|
||||||
// If createdTime is not defined (which happens when connected to server older
|
// If createdTime is not defined (which happens when connected to server older
|
||||||
|
Loading…
Reference in New Issue
Block a user