Ticket #1709: error_api.patch

File error_api.patch, 1.1 KB (added by fbennett, 6 years ago)
  • chrome/content/zotero/xpcom/integration.js

    old new  
    698698                 
    699699                // get bibliography and format as RTF 
    700700                var bib = this._session.getBibliography(); 
    701                 var bibliographyText = bib[0].bibstart+bib[1].join("\\\r\n")+"\\\r\n"+bib[0].bibend; 
     701                var bibliographyText = ""; 
     702                if (bib) { 
     703                        bibliographyText = bib[0].bibstart+bib[1].join("\\\r\n")+"\\\r\n"+bib[0].bibend; 
    702704                 
    703705                // if bibliography style not set, set it 
    704706                if(!this._session.data.bibliographyStyleHasBeenSet) { 
     
    712714                        this._session.data.bibliographyStyleHasBeenSet = true; 
    713715                        this._doc.setDocumentData(this._session.data.serializeXML()); 
    714716                } 
     717                } 
    715718                 
    716719                // set bibliography text 
    717720                for each(var field in this._bibliographyFields) { 
     
    13321335         
    13331336        // generate bibliography 
    13341337        var bib = this.style.makeBibliography(); 
    1335          
     1338        if (bib) { 
    13361339        // omit items 
    13371340        Zotero.Cite.removeFromBibliography(bib, this.omittedItems);      
    13381341         
     
    13421345                        bib[1][i] = this.customBibliographyText[bib[0].entry_ids[i]]; 
    13431346                } 
    13441347        } 
     1348        } 
    13451349         
    13461350        return bib; 
    13471351}