Update adb.js

This commit is contained in:
Namhyeon Go 2022-03-02 23:51:07 +09:00 committed by GitHub
parent b7b69076c7
commit 0965c5930b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -32,7 +32,12 @@ function ADBObject() {
}; };
this.getHostname = function(id) { this.getHostname = function(id) {
return this.getProperty(id, "net.hostname").trim(); var result = this.getProperty(id, "net.hostname");
if (typeof result === "string") {
return result.trim();
} else {
return "";
}
}; };
this.getProperty = function(id, name) { this.getProperty = function(id, name) {