mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-07 08:34:29 +01:00
fix TypeError for numeric _id
This commit is contained in:
parent
e0d4a9fce8
commit
9974b35420
@ -966,13 +966,17 @@ export class Et2Tree extends Et2WidgetWithSelectMixin(LitElement)
|
||||
* @return {TreeItemData} node with the given _id or null
|
||||
* @private
|
||||
*/
|
||||
private _search(_id: string, data: TreeItemData[]): TreeItemData
|
||||
private _search(_id: string|number, data: TreeItemData[]): TreeItemData
|
||||
{
|
||||
let res: TreeItemData = null
|
||||
if (_id == undefined)
|
||||
{
|
||||
return null
|
||||
}
|
||||
if (typeof _id === "number")
|
||||
{
|
||||
_id = _id + "";
|
||||
}
|
||||
for (const value of data)
|
||||
{
|
||||
if (value.id === _id)
|
||||
|
Loading…
Reference in New Issue
Block a user