Fix potential line.replace() error in RIS detect

This commit is contained in:
Dan Stillman 2009-07-16 10:33:10 +00:00
parent 78bfa79f9e
commit 3a5da5e6df
2 changed files with 3 additions and 3 deletions

View file

@ -1 +1 @@
2009-07-16 09:20:00 2009-07-16 10:35:00

View file

@ -8,7 +8,7 @@
"maxVersion":"", "maxVersion":"",
"priority":100, "priority":100,
"inRepository":true, "inRepository":true,
"lastUpdated":"2008-12-01 18:31:54" "lastUpdated":"2009-07-16 10:35:00"
} }
Zotero.configure("dataMode", "line"); Zotero.configure("dataMode", "line");
@ -18,7 +18,7 @@ Zotero.addOption("exportCharset", "UTF-8");
function detectImport() { function detectImport() {
var line; var line;
var i = 0; var i = 0;
while((line = Zotero.read()) !== "false") { while((line = Zotero.read()) !== false) {
line = line.replace(/^\s+/, ""); line = line.replace(/^\s+/, "");
if(line != "") { if(line != "") {
if(line.substr(0, 6).match(/^TY {1,2}- /)) { if(line.substr(0, 6).match(/^TY {1,2}- /)) {