Clear guidance panel before adding text

This is probably only necessary if the pref is reset manually, but this
prevents duplicate text in that situation.
This commit is contained in:
Dan Stillman 2014-05-14 17:18:54 -04:00
parent 3ee09e8d38
commit 7ac35363e3

View file

@ -54,6 +54,11 @@
if(!text) text = Zotero.getString("firstRunGuidance."+about);
text = text.split("\n");
var descriptionNode = panel.lastChild;
while (descriptionNode.hasChildNodes()) {
descriptionNode.removeChild(descriptionNode.firstChild);
}
while(text.length) {
var textLine = text.shift();
descriptionNode.appendChild(document.createTextNode(textLine));