mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-16 22:42:16 +00:00
Bugfix: filter not null
This commit is contained in:
@@ -37,7 +37,7 @@ export default {
|
||||
let res = arr.filter(n => n.key == key);
|
||||
if (res.length)
|
||||
return res.pop();
|
||||
res = arr.map(n => n.children ? this.findNodeByKey(key, n.children) : null).filter();
|
||||
res = arr.map(n => n.children ? this.findNodeByKey(key, n.children) : null).filter(a => a);
|
||||
if (res.length)
|
||||
return res.pop();
|
||||
return null;
|
||||
|
||||
Reference in New Issue
Block a user