From 3cfb984b2d77b365fa95b6cbd85aae4b981d9cda Mon Sep 17 00:00:00 2001 From: "Namhyeon, Go" Date: Thu, 21 Oct 2021 15:53:13 +0900 Subject: [PATCH] Update chrome.js --- lib/chrome.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/chrome.js b/lib/chrome.js index 108fdf4..e368ba1 100644 --- a/lib/chrome.js +++ b/lib/chrome.js @@ -349,7 +349,13 @@ var ChromeObject = function() { try { var responseText = this.evaluate(expression); console.info(responseText); - return JSON.parse(responseText).result.result.value; + + var result = JSON.parse(responseText).result.result.value; + if (typeof(result) !== "undefined" && result != null) { + return result; + } else { + return ""; + } } catch (e) { console.error("ChromeObject.getEvaluatedValue() ->", e.message); return "";