From 0965c5930b80b6e15bdd6867518e41e6c688a7f2 Mon Sep 17 00:00:00 2001 From: "Namhyeon, Go" Date: Wed, 2 Mar 2022 23:51:07 +0900 Subject: [PATCH] Update adb.js --- lib/adb.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/adb.js b/lib/adb.js index ee28799..e3d3c67 100644 --- a/lib/adb.js +++ b/lib/adb.js @@ -32,7 +32,12 @@ function ADBObject() { }; 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) {