only call replace on _value of type string, otherwise (eg. null) gives exception

This commit is contained in:
Ralf Becker 2013-02-05 08:55:09 +00:00
parent f2cdcefda1
commit 1312a397f1

View File

@ -401,7 +401,7 @@ var et2_date_duration = et2_date.extend({
// use decimal separator from user prefs
var sep = '.';
var format = this.egw().preference('number_format');
if (format && (sep = format[0]) && sep != '.')
if (typeof _value == 'string' && format && (sep = format[0]) && sep != '.')
{
_value = _value.replace('.',sep);
}