From 9ee63e7993b33ada5e8634de5ff9c4c9fa1799b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Fri, 11 Oct 2019 12:06:14 +0200 Subject: [PATCH] Use typeof instead of instanceof to test for string All strings are not instance of String. issue8706 --- src/common.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/common.js b/src/common.js index 7a241a869d..2a541296c9 100644 --- a/src/common.js +++ b/src/common.js @@ -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]);