feature: improve route for extensions
This commit is contained in:
parent
b7085a171e
commit
e07cafb5c8
@ -1,8 +1,12 @@
|
||||
window.hubl.getRoute = (type, returnFirst = false) => {
|
||||
let availables = window.hubl.components.filter(c => c.type == type || c.uniq == type);
|
||||
availables.map(c => {
|
||||
window.hubl.components.forEach(c => {
|
||||
if (c.extensions) {
|
||||
c.extensions.forEach(e => availables.push(e.type));
|
||||
c.extensions.forEach(e => {
|
||||
if (e.type == type || e.uniq == type) {
|
||||
availables.push(e.type);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
if (availables.length > 1) {
|
||||
|
@ -12,9 +12,13 @@
|
||||
let routes = new Set();
|
||||
const getRoute = (type, returnFirst = false) => {
|
||||
let availables = components.filter(c => c.type == type || c.uniq == type);
|
||||
availables.map(c => {
|
||||
components.forEach(c => {
|
||||
if (c.extensions) {
|
||||
c.extensions.forEach(e => availables.push(e.type));
|
||||
c.extensions.forEach(e => {
|
||||
if (e.type == type || e.uniq == type) {
|
||||
availables.push(e.type);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
if (availables.length > 1) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user