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) {
|
||||
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));
|
||||
for (let line of lines) {
|
||||
try {
|
||||
eval(line);
|
||||
}
|
||||
catch (e) {
|
||||
Zotero.logError(e);
|
||||
dump(e + "\n\n");
|
||||
Components.utils.reportError(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue