Fix error in doc prefs window if lastStyle is set to an invalid style
This commit is contained in:
parent
7a2d7594d4
commit
56eb416e3e
1 changed files with 2 additions and 1 deletions
|
@ -62,6 +62,7 @@ var Zotero_File_Interface_Bibliography = new function() {
|
|||
// add styles to list
|
||||
var index = 0;
|
||||
var nStyles = styles.length;
|
||||
var selectIndex = -1;
|
||||
for(var i=0; i<nStyles; i++) {
|
||||
var itemNode = document.createElement("listitem");
|
||||
itemNode.setAttribute("value", styles[i].styleID);
|
||||
|
@ -69,7 +70,7 @@ var Zotero_File_Interface_Bibliography = new function() {
|
|||
listbox.appendChild(itemNode);
|
||||
|
||||
if(styles[i].styleID == _io.style) {
|
||||
var selectIndex = index;
|
||||
selectIndex = index;
|
||||
}
|
||||
index++;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue