Fx60: Fix parsing of some default preferences for extensions
This commit is contained in:
parent
01e988f07d
commit
efdc4bae19
1 changed files with 3 additions and 2 deletions
|
@ -364,14 +364,15 @@ Zotero.Prefs = new function(){
|
||||||
}
|
}
|
||||||
|
|
||||||
function readDefaults(contents) {
|
function readDefaults(contents) {
|
||||||
let re = /^\s*pref\s*\(\s*['"]([a-zA-Z0-9_\-.]+)['"]\s*,\s*([^\s\)]+)\s*\)\s*;\s*$/;
|
let re = /^\s*pref\s*\(\s*['"]([a-zA-Z0-9_\-.]+)['"]\s*,\s*["']?.*["']?\s*\)\s*;\s*$/;
|
||||||
let lines = contents.split(/\n/g).filter(line => re.test(line));
|
let lines = contents.split(/\n/g).filter(line => re.test(line));
|
||||||
for (let line of lines) {
|
for (let line of lines) {
|
||||||
try {
|
try {
|
||||||
eval(line);
|
eval(line);
|
||||||
}
|
}
|
||||||
catch (e) {
|
catch (e) {
|
||||||
Zotero.logError(e);
|
dump(e + "\n\n");
|
||||||
|
Components.utils.reportError(e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue