Browse Source

Merge branch 'master' of git://github.com/neptunix/btc-rpc-explorer into neptunix-master

fix-133-memory-crash
Dan Janosik 6 years ago
parent
commit
6811af4846
  1. 9
      routes/baseActionsRouter.js

9
routes/baseActionsRouter.js

@ -830,7 +830,7 @@ router.get("/rpc-browser", function(req, res, next) {
var argProperties = argDetails[i].properties;
for (var j = 0; j < argProperties.length; j++) {
if (argProperties[j] == "numeric") {
if (argProperties[j] === "numeric") {
if (req.query.args[i] == null || req.query.args[i] == "") {
argValues.push(null);
@ -840,20 +840,23 @@ router.get("/rpc-browser", function(req, res, next) {
break;
} else if (argProperties[j] == "boolean") {
} else if (argProperties[j] === "boolean") {
if (req.query.args[i]) {
argValues.push(req.query.args[i] == "true");
}
break;
} else if (argProperties[j] == "string") {
} else if (argProperties[j] === "string" || argProperties[j] === "numeric or string") {
if (req.query.args[i]) {
argValues.push(req.query.args[i]);
}
break;
}
else {
console.log(`Unknown argument property: ${argProperties[j]}`);
}
}
}
}

Loading…
Cancel
Save