mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-26 08:38:54 +01:00
Et2DateDuration: Don't error & break everything for a bad display format, just log it and continue
This commit is contained in:
parent
1538496df1
commit
bb67507223
@ -352,6 +352,12 @@ export class Et2DateDuration extends Et2InputWidget(FormControlMixin(LitElement)
|
||||
set displayFormat(value : string)
|
||||
{
|
||||
this.__displayFormat = "";
|
||||
if(!value)
|
||||
{
|
||||
// Don't allow an empty value, but don't throw a real error
|
||||
console.warn("Invalid displayFormat ", value, this);
|
||||
value = "dhm";
|
||||
}
|
||||
// Display format must be in decreasing size order (dhms) or the calculations
|
||||
// don't work out nicely
|
||||
for(let f of Object.keys(Et2DateDuration.time_formats))
|
||||
|
Loading…
Reference in New Issue
Block a user