Use typeof instead of instanceof to test for string
All strings are not instance of String. issue8706
This commit is contained in:
1 parent
3c7d6214a4
commit
9ee63e7993
1 file changed
+1
-1
+1
-1
@@ -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]);
|
||||
|
||||
Reference in new issue
Block a user