Avoid dereferencing a null object and throwing a needless JS error

This commit is contained in:
scott%scott-macgregor.org 2005-04-22 21:18:08 +00:00
Родитель 40bff2dfd0
Коммит 797657a239
1 изменённых файлов: 2 добавлений и 1 удалений

Просмотреть файл

@ -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);