Skip to content
Snippets Groups Projects
Commit 2844bb88 authored by Julian Labus's avatar Julian Labus Committed by David Bauer
Browse files

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).
parent 1215a499
Branches
Tags
No related merge requests found
...@@ -527,7 +527,9 @@ var firmwarewizard = function() { ...@@ -527,7 +527,9 @@ var firmwarewizard = function() {
if (modelList.length == 1) { if (modelList.length == 1) {
var vendor = modelList[0][MODEL_VENDOR]; var vendor = modelList[0][MODEL_VENDOR];
var model = modelList[0][MODEL_MODEL]; var model = modelList[0][MODEL_MODEL];
var revision = modelList[0][MODEL_MATCHED_REVISION];
return images[vendor][model] return images[vendor][model]
.filter(function(value, index, self) { return value['revision'] == revision; })
.map(function(e) { return e.type; }) .map(function(e) { return e.type; })
.filter(function(value, index, self) { return self.indexOf(value) === index; }) .filter(function(value, index, self) { return self.indexOf(value) === index; })
.sort(); .sort();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment