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

Fix missing icons for some nodes (#1321)

This commit is contained in:
Kazuki Nakanishi 2017-07-04 17:04:27 +09:00 committed by Nick O'Leary
parent a737810c50
commit 347e598715
2 changed files with 9 additions and 0 deletions

View File

@ -599,6 +599,9 @@ function getNodeIconPath(module,icon) {
}
}
}
if (module !== "node-red") {
return getNodeIconPath("node-red", icon);
}
return defaultIcon;
}

View File

@ -497,6 +497,12 @@ describe("red/nodes/registry/registry",function() {
var iconPath = typeRegistry.getNodeIconPath('test-module','test_icon.png');
iconPath.should.eql(testIcon);
});
it('returns the debug icon when getting an unknown module', function() {
var debugIcon = path.resolve(__dirname+'/../../../../../public/icons/debug.png');
var iconPath = typeRegistry.getNodeIconPath('unknown-module', 'debug.png');
iconPath.should.eql(debugIcon);
});
});
});