Skip to content

Commit

Permalink
fix #592 Fix marketName issue (#593)
Browse files Browse the repository at this point in the history
Signed-off-by: Joowon Moon <jsjs401@daum.net>
  • Loading branch information
jsjs4013 committed Sep 30, 2022
1 parent 40757e7 commit 0c74b53
Show file tree
Hide file tree
Showing 2 changed files with 957 additions and 945 deletions.
9 changes: 8 additions & 1 deletion lib/util/devutil.js
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,14 @@ devutil.makeIdentity = function(serial, properties) {
else if (marketName) {
var devices = androidDeviceList.getDevicesByDeviceId(marketName)
if (devices.length > 0) {
marketName = devices[0].name
const deviceFilter = devices.filter(device => device.model === model)

if (deviceFilter.length > 0) {
marketName = deviceFilter[0].name
}
else {
marketName = devices[0].name
}
}
}

Expand Down
Loading

0 comments on commit 0c74b53

Please sign in to comment.