fix: getRoute last
This commit is contained in:
parent
d397040d59
commit
8f5aed11e0
@ -12,6 +12,11 @@
|
||||
let routes = new Set();
|
||||
const getRoute = (type, returnFirst = false) => {
|
||||
let availables = components.filter(c=>c.type==type||c.uniq==type);
|
||||
availables.map(c => {
|
||||
if(c.extensions) {
|
||||
c.extensions.forEach(e => availables.push(e.type));
|
||||
}
|
||||
});
|
||||
if(availables.length > 1) {
|
||||
if(returnFirst) {
|
||||
return availables[0].route;
|
||||
|
Loading…
Reference in New Issue
Block a user