зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1811332 - Make sure `this.indicator` is truthy before using it. r=Gijs
The `indicator` getter may return `null` so we cannot just call methods on it. Differential Revision: https://phabricator.services.mozilla.com/D169717
This commit is contained in:
Родитель
bb324f0e83
Коммит
c4ea893f2d
|
@ -471,7 +471,11 @@ const DownloadsIndicatorView = {
|
|||
},
|
||||
|
||||
_maybeScheduleProgressUpdate() {
|
||||
if (!this._progressRaf && document.visibilityState == "visible") {
|
||||
if (
|
||||
this.indicator &&
|
||||
!this._progressRaf &&
|
||||
document.visibilityState == "visible"
|
||||
) {
|
||||
this._progressRaf = requestAnimationFrame(() => {
|
||||
// indeterminate downloads (unknown content-length) will show up as aValue = 0
|
||||
if (this._percentComplete >= 0) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче