Wrap number in quotes if string search
This commit is contained in:
parent
392f9f21f6
commit
fae4c9586a
|
@ -157,8 +157,11 @@ class QueryBuilder {
|
|||
if (escape && originalType === "string") {
|
||||
value = `${value}`.replace(/[ #+\-&|!(){}\]^"~*?:\\]/g, "\\$&")
|
||||
}
|
||||
|
||||
// Wrap in quotes
|
||||
if (hasVersion && wrap) {
|
||||
if (originalType === "string" && !isNaN(value)) {
|
||||
value = `"${value}"`
|
||||
} else if (hasVersion && wrap) {
|
||||
value = originalType === "number" ? value : `"${value}"`
|
||||
}
|
||||
return value
|
||||
|
|
Loading…
Reference in New Issue