mirror of
https://github.com/gnh1201/welsonjs.git
synced 2025-10-19 15:20:56 +00:00
Update chrome.js
This commit is contained in:
parent
2a465de78f
commit
3cfb984b2d
|
@ -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 "";
|
||||
|
|
Loading…
Reference in New Issue
Block a user