mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-12-24 01:10:31 +01:00
fixed client-side so semver doesn't explode when nbbpm returns 'latest', fixed tests so they pass again, #2363
This commit is contained in:
@@ -55,7 +55,7 @@ define('admin/extend/plugins', function() {
|
||||
Plugins.suggest(pluginID, function(err, payload) {
|
||||
if (!err) {
|
||||
require(['semver'], function(semver) {
|
||||
if (semver.gt(payload.version, parent.find('.currentVersion').text())) {
|
||||
if (payload.version === 'latest' || semver.gt(payload.version, parent.find('.currentVersion').text())) {
|
||||
btn.attr('disabled', true).find('i').attr('class', 'fa fa-refresh fa-spin');
|
||||
socket.emit('admin.plugins.upgrade', {
|
||||
id: pluginID,
|
||||
|
||||
@@ -26,8 +26,9 @@ module.exports = function(Meta) {
|
||||
|
||||
Meta.configs.list = function (callback) {
|
||||
db.getObject('config', function (err, config) {
|
||||
config = config || {};
|
||||
config.version = pkg.version;
|
||||
callback(err, config || {});
|
||||
callback(err, config);
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user