Avoid CustomizableUI warnings in console after resetDB() during tests

This commit is contained in:
Dan Stillman 2016-11-30 21:17:58 -05:00
parent 1472781ce4
commit 4f44cc10ce

View file

@ -511,6 +511,8 @@ var removeDir = Zotero.Promise.coroutine(function* (dir) {
* any that were set at startup
*/
function resetDB(options = {}) {
// Hack to avoid CustomizableUI warnings in console from icon.js
var toolbarIconAdded = Zotero.toolbarIconAdded;
resetPrefs();
if (options.thisArg) {
@ -525,7 +527,10 @@ function resetDB(options = {}) {
false,
options
)
.then(() => Zotero.Schema.schemaUpdatePromise);
.then(() => {
Zotero.toolbarIconAdded = toolbarIconAdded;
return Zotero.Schema.schemaUpdatePromise;
});
}
/**