Commit 249f589
authored
fix(js): handle the component unmounting (#340)
* Fixes #339 - Handle the component unmounting
If the component unmounts immediately after mounting, then the call to
requestAnimationFrame will attempt to operate on the unmounted
component. We can prevent this by ensuring we cleanup the callback on
unmounting.
* Default value to undefined, rather than 01 parent 24f0405 commit 249f589
1 file changed
Lines changed: 8 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
| 58 | + | |
58 | 59 | | |
59 | 60 | | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
60 | 67 | | |
61 | 68 | | |
62 | 69 | | |
63 | | - | |
| 70 | + | |
64 | 71 | | |
65 | 72 | | |
66 | 73 | | |
| |||
0 commit comments