Make it easy to create test success and failed tx

This commit is contained in:
Justin Starry
2020-04-04 17:24:25 +08:00
committed by Michael Vines
parent 152d7bc774
commit 60981f2031
3 changed files with 44 additions and 10 deletions

View File

@@ -6,7 +6,13 @@ export function findGetParameter(parameterName: string): string | null {
.split("&")
.forEach(function(item) {
tmp = item.split("=");
if (tmp[0] === parameterName) result = decodeURIComponent(tmp[1]);
if (tmp[0] === parameterName) {
if (tmp.length === 2) {
result = decodeURIComponent(tmp[1]);
} else if (tmp.length === 1) {
result = "";
}
}
});
return result;
}