Update 0BDFDB.plugin.js

This commit is contained in:
Mirco Wittrien 2021-01-31 13:38:52 +01:00
parent 50e0fa380b
commit 66b077918f
1 changed files with 1 additions and 1 deletions

View File

@ -598,7 +598,7 @@ module.exports = (_ => {
LibraryRequires.request(url, (error, response, body) => {
if (error || !window.PluginUpdates.plugins[url]) return callback(null);
let newName = (body.match(/"name"\s*:\s*"([^"]+)"/) || [])[1] || pluginName;
let newVersion = body.match(/['"][0-9]+\.[0-9]+\.[0-9]+['"]/i).toString().replace(/['"]/g, "");
let newVersion = (body.match(/['"][0-9]+\.[0-9]+\.[0-9]+['"]/i) || "").toString().replace(/['"]/g, "");
if (!newVersion) return callback(null);
if (pluginName == newName && BDFDB.NumberUtils.getVersionDifference(newVersion[0], window.PluginUpdates.plugins[url].version) > 0.2) {
BDFDB.NotificationUtils.toast(BDFDB.LanguageUtils.LibraryStringsFormat("toast_plugin_force_updated", pluginName), {