diff --git a/chrome/content/zotero/xpcom/collectionTreeView.js b/chrome/content/zotero/xpcom/collectionTreeView.js index c8826a7bc..776c12c6f 100644 --- a/chrome/content/zotero/xpcom/collectionTreeView.js +++ b/chrome/content/zotero/xpcom/collectionTreeView.js @@ -106,7 +106,9 @@ Zotero.CollectionTreeView.prototype.refresh = function() var unfiledLibraries = Zotero.Prefs.get('unfiledLibraries').split(','); } catch (e) { - unfiledLibraries = []; + // Add to personal library by default + Zotero.Prefs.set('unfiledLibraries', '0'); + unfiledLibraries = ['0']; } var self = this; diff --git a/chrome/content/zotero/xpcom/zotero.js b/chrome/content/zotero/xpcom/zotero.js index 97a34b909..dd4c201f7 100644 --- a/chrome/content/zotero/xpcom/zotero.js +++ b/chrome/content/zotero/xpcom/zotero.js @@ -1604,14 +1604,14 @@ Zotero.Prefs = new function(){ Zotero.debug("Creating boolean pref '" + pref + "'"); return this.prefBranch.setBoolPref(pref, value); } - if (parseInt(value) == value) { - Zotero.debug("Creating integer pref '" + pref + "'"); - return this.prefBranch.setIntPref(pref, value); - } if (typeof value == 'string') { Zotero.debug("Creating string pref '" + pref + "'"); return this.prefBranch.setCharPref(pref, value); } + if (parseInt(value) == value) { + Zotero.debug("Creating integer pref '" + pref + "'"); + return this.prefBranch.setIntPref(pref, value); + } throw ("Invalid preference value '" + value + "' for pref '" + pref + "'"); } }