Merge pull request #8097 from Budibase/bug/sev3/public-api-equals-number
Public api equals query - support for number strings
This commit is contained in:
commit
ec02dda877
|
@ -157,8 +157,11 @@ class QueryBuilder {
|
||||||
if (escape && originalType === "string") {
|
if (escape && originalType === "string") {
|
||||||
value = `${value}`.replace(/[ #+\-&|!(){}\]^"~*?:\\]/g, "\\$&")
|
value = `${value}`.replace(/[ #+\-&|!(){}\]^"~*?:\\]/g, "\\$&")
|
||||||
}
|
}
|
||||||
|
|
||||||
// Wrap in quotes
|
// Wrap in quotes
|
||||||
if (hasVersion && wrap) {
|
if (originalType === "string" && !isNaN(value)) {
|
||||||
|
value = `"${value}"`
|
||||||
|
} else if (hasVersion && wrap) {
|
||||||
value = originalType === "number" ? value : `"${value}"`
|
value = originalType === "number" ? value : `"${value}"`
|
||||||
}
|
}
|
||||||
return value
|
return value
|
||||||
|
|
Loading…
Reference in New Issue