fix debug.js error

This commit is contained in:
oppofind 2020-12-23 21:38:14 +08:00
parent ce60956360
commit 7fbe4bf5f0
1 changed files with 5 additions and 1 deletions

View File

@ -55,7 +55,7 @@ $("button").on("click", function () {
console.log("json-body=>" + body);
let finalUrl = "";
let queryParamData = "";
if (page != "" || page != null) {
if (!isEmpty(page)) {
queryParamData = getInputData($queryElement)
finalUrl = castToGetUri(page, pathParamData, queryParamData)
window.open(finalUrl, "_blank");
@ -286,4 +286,8 @@ function toCurl(request) {
});
console.log(curlCmd);
return curlCmd;
}
function isEmpty(obj){
return obj === undefined || obj === null || new String(obj).trim() === '';
}