diff --git a/chrome/content/zotero/xpcom/translation/translate.js b/chrome/content/zotero/xpcom/translation/translate.js index bb29810368..0e6b8060b9 100644 --- a/chrome/content/zotero/xpcom/translation/translate.js +++ b/chrome/content/zotero/xpcom/translation/translate.js @@ -2204,7 +2204,7 @@ Zotero.Translate.IO.String.prototype = { if(lfIndex !== -1) { // in case we have a CRLF this.bytesRead = lfIndex+1; - if(this.contentLength > lfIndex && this.string[lfIndex-1] === "\r") { + if(this.contentLength > lfIndex && this.string.substr(lfIndex-1, 1) === "\r") { lfIndex--; } return this.string.substr(oldPointer, lfIndex-oldPointer);