1
0
mirror of https://github.com/node-red/node-red.git synced 2023-10-10 13:36:53 +02:00

fix failure of node installation (#1658)

This commit is contained in:
Hiroyasu Nishiyama 2018-03-03 16:35:17 +09:00 committed by Nick O'Leary
parent 4ebb5d099e
commit cfcf78ae28

View File

@ -131,8 +131,8 @@ function reportNodeStateChange(info,enabled) {
}
function installModule(module,version) {
var module = registry.getModuleInfo(module);
var isUpgrade = !!module;
var ex_module = registry.getModuleInfo(module);
var isUpgrade = !!ex_module;
return registry.installModule(module,version).then(function(info) {
if (isUpgrade) {
events.emit("runtime-event",{id:"node/upgraded",retain:false,payload:{module:module,version:version}});