Update 0BDFDB.plugin.js

This commit is contained in:
Mirco Wittrien 2021-02-07 22:30:09 +01:00 committed by GitHub
parent 7945e128ca
commit e0012596bc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 2 deletions

View File

@ -593,7 +593,8 @@ module.exports = (_ => {
BDFDB.TimeUtils.suppress(_ => {
if (!BDFDB.ObjectUtils.is(plugin)) return;
if (plugin == window.BDFDB_Global) {
document.querySelector(BDFDB.dotCN.noticeupdate)?.close();
let updateNotice = document.querySelector(BDFDB.dotCN.noticeupdate);
if (updateNotice) updateNotice.close();
BDFDB.TimeUtils.clear(PluginStores.updateData.interval);
delete window.BDFDB_Global.loaded;
BDFDB.TimeUtils.interval((interval, count) => {
@ -7245,7 +7246,7 @@ module.exports = (_ => {
svgName: InternalComponents.LibraryComponents.SvgIcon.Names.CHANGELOG,
onClick: _ => {BDFDB.PluginUtils.openChangeLog(plugin);}
}));
if (PluginStores.updateData.plugins[url]?.outdated) controls.push(InternalBDFDB.createCustomControl({
if (PluginStores.updateData.plugins[url] && PluginStores.updateData.plugins[url].outdated) controls.push(InternalBDFDB.createCustomControl({
tooltipText: BDFDB.LanguageUtils.LanguageStrings.UPDATE_MANUALLY,
svgName: InternalComponents.LibraryComponents.SvgIcon.Names.DOWNLOAD,
onClick: _ => {BDFDB.PluginUtils.downloadUpdate(plugin.name, url);}