Fix redundant SPV triggered for unknown types

Fix issue where declarations against parameters with non-standard value
type trigger an SPV call when the value being declared is a boolean or
a number.
This commit is contained in:
Zaid Abdulla committed 2021-09-16 13:27:37 -07:00
1 parent c3c7ab72b2
commit ec770b4e1b
1 file changed
+1 -8
+1 -8
View File
@@ -54,13 +54,6 @@ export function sanitizeParameterValue(
else parameterValue[0] = b;
}
break;
case "xsd:string":
case "xsd:base64":
case "xsd:hexBinary":
if (typeof parameterValue[0] !== "string")
parameterValue[0] = "" + parameterValue[0];
break;
case "xsd:int":
case "xsd:unsignedInt":
if (typeof parameterValue[0] !== "number") {
@@ -83,7 +76,7 @@ export function sanitizeParameterValue(
}
break;
default:
parameterValue[0] = JSON.parse(JSON.stringify(parameterValue[0]));
parameterValue[0] = "" + parameterValue[0];
break;
}
}