From 2844bb88135509b3fd17a90beab09e4f40643219 Mon Sep 17 00:00:00 2001 From: Julian Labus <julian@labus-online.de> Date: Mon, 19 Aug 2019 19:10:31 +0200 Subject: [PATCH] app: include revision in getImageTypes() filter Revisions of one device might have different available images. For example only v3 of the TP-Link Archer C50 has a bootloader image. But without filtering a button "Bootloader-Image" would also be shown for the v4 (and all future revisions). --- app.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app.js b/app.js index 504e454..0570e37 100644 --- a/app.js +++ b/app.js @@ -527,7 +527,9 @@ var firmwarewizard = function() { if (modelList.length == 1) { var vendor = modelList[0][MODEL_VENDOR]; var model = modelList[0][MODEL_MODEL]; + var revision = modelList[0][MODEL_MATCHED_REVISION]; return images[vendor][model] + .filter(function(value, index, self) { return value['revision'] == revision; }) .map(function(e) { return e.type; }) .filter(function(value, index, self) { return self.indexOf(value) === index; }) .sort(); -- GitLab