Commit ed96880
Ensure chart.ctx exists during deferred updates (#14)
Ensure the chart instance is still alive. It may have been destroyed
during a delay and calling chart.update() will fail. The most common
reason for such scenario is user navigation.
Steps:
- open a view with the chart that has a deferred render;
- close a view before the delay timer expires.
After the second step both chart.ctx and chart.canvas won't exist.
Note that chart.canvas is a reference of chart.ctx.canvas.1 parent 82144df commit ed96880
1 file changed
+8
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
155 | 155 | | |
156 | 156 | | |
157 | 157 | | |
158 | | - | |
159 | | - | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
160 | 166 | | |
161 | 167 | | |
162 | 168 | | |
| |||
0 commit comments