Add unit tests for allowUpdate settings

This commit is contained in:
Nick O'Leary
2021-09-14 10:50:26 +01:00
parent d9bed03025
commit 85820c571d
3 changed files with 150 additions and 7 deletions

View File

@@ -333,10 +333,8 @@ RED.palette.editor = (function() {
nodeEntry.versionSpan.html(moduleInfo.version+' <i class="fa fa-long-arrow-right"></i> '+moduleInfo.pending_version).appendTo(nodeEntry.metaRow)
nodeEntry.updateButton.text(RED._('palette.editor.updated')).addClass('disabled').css('display', 'inline-block');
} else if (loadedIndex.hasOwnProperty(module)) {
if (updateAllowed
&&
semVerCompare(loadedIndex[module].version,moduleInfo.version) > 0
&&
if (updateAllowed &&
semVerCompare(loadedIndex[module].version,moduleInfo.version) > 0 &&
RED.utils.checkModuleAllowed(module,null,updateAllowList,updateDenyList)
) {
nodeEntry.updateButton.show();