fix #592 Fix marketName issue (#593)

Signed-off-by: Joowon Moon <jsjs401@daum.net>
This commit is contained in:
Joowon Moon
2022-09-30 20:29:54 +09:00
committed by GitHub
parent 40757e73a4
commit 0c74b53a94
2 changed files with 957 additions and 945 deletions

View File

@@ -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
}
}
}