Use typeof instead of instanceof to test for string

All strings are not instance of String.

issue8706
This commit is contained in:
Cédric Krier committed 2019-10-11 12:06:14 +02:00
1 parent 3c7d6214a4
commit 9ee63e7993
1 file changed
+1 -1
+1 -1
View File
@@ -1740,7 +1740,7 @@
}
if (~['integer', 'float', 'numeric', 'datetime', 'date',
'time'].indexOf(field.type)) {
if ((value instanceof String) && value.contains('..')) {
if ((typeof value == 'string') && value.contains('..')) {
var values = value.split('..', 2);
var lvalue = this.convert_value(field, values[0]);
var rvalue = this.convert_value(field, values[1]);