mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-06-27 21:32:46 +02:00
check toolbar preference has a reasonable value: is a real object (not an array), strings e.g. stall the whole widget
This commit is contained in:
parent
d37b5b99f6
commit
76fee91a50
@ -275,7 +275,11 @@ export class et2_toolbar extends et2_DOMWidget implements et2_IInput
|
|||||||
}
|
}
|
||||||
|
|
||||||
let pref = (!egwIsMobile())? egw.preference(this.options.preference_id, this.options.preference_app): undefined;
|
let pref = (!egwIsMobile())? egw.preference(this.options.preference_id, this.options.preference_app): undefined;
|
||||||
if (pref && !jQuery.isArray(pref)) this.preference = pref;
|
// check pref has a reasonable value: is a real object (not an array), strings e.g. stall the whole widget
|
||||||
|
if (pref && typeof pref === 'object' && !Array.isArray(pref))
|
||||||
|
{
|
||||||
|
this.preference = pref;
|
||||||
|
}
|
||||||
|
|
||||||
//Set the default actions for the first time
|
//Set the default actions for the first time
|
||||||
if (typeof pref === 'undefined' && !isDefault)
|
if (typeof pref === 'undefined' && !isDefault)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user