зеркало из https://github.com/mozilla/gecko-dev.git
Avoid dereferencing a null object and throwing a needless JS error
This commit is contained in:
Родитель
40bff2dfd0
Коммит
797657a239
|
@ -162,6 +162,7 @@ Feed.prototype =
|
|||
var lastModified = this.lastModified;
|
||||
if (lastModified)
|
||||
this.request.setRequestHeader("If-Modified-Since", lastModified);
|
||||
|
||||
this.request.overrideMimeType("text/xml");
|
||||
this.request.onload = this.onDownloaded;
|
||||
this.request.onerror = this.onDownloadError;
|
||||
|
@ -389,7 +390,7 @@ Feed.prototype =
|
|||
// otherwise it triggers a download done notification to the UI
|
||||
storeNextItem: function()
|
||||
{
|
||||
if (!this.itemsToStore.length)
|
||||
if (!this.itemsToStore || !this.itemsToStore.length)
|
||||
{
|
||||
this.createFolder();
|
||||
return this.cleanupParsingState(this);
|
||||
|
|
Загрузка…
Ссылка в новой задаче