Update chrome.js

This commit is contained in:
Namhyeon Go 2021-10-21 15:53:13 +09:00 committed by GitHub
parent 2a465de78f
commit 3cfb984b2d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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 "";