mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-02-16 18:31:26 +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
|
* @return {TreeItemData} node with the given _id or null
|
||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
private _search(_id: string, data: TreeItemData[]): TreeItemData
|
private _search(_id: string|number, data: TreeItemData[]): TreeItemData
|
||||||
{
|
{
|
||||||
let res: TreeItemData = null
|
let res: TreeItemData = null
|
||||||
if (_id == undefined)
|
if (_id == undefined)
|
||||||
{
|
{
|
||||||
return null
|
return null
|
||||||
}
|
}
|
||||||
|
if (typeof _id === "number")
|
||||||
|
{
|
||||||
|
_id = _id + "";
|
||||||
|
}
|
||||||
for (const value of data)
|
for (const value of data)
|
||||||
{
|
{
|
||||||
if (value.id === _id)
|
if (value.id === _id)
|
||||||
|
Loading…
Reference in New Issue
Block a user