show IS attrs in untyped unless the type has attrs
parent
942ccf1c40
commit
8d02371d17
|
@ -238,28 +238,34 @@ export default defineComponent({
|
|||
);
|
||||
untypedAttributes.length = 0;
|
||||
|
||||
attributes.value
|
||||
.filter(([_, entry]) => entry.attribute !== "IS")
|
||||
.forEach(([entryAddr, entry]) => {
|
||||
const entryTypes = Object.entries(allTypes.value).filter(([_, t]) =>
|
||||
t.attributes.includes(entry.attribute)
|
||||
);
|
||||
if (entryTypes.length > 0) {
|
||||
entryTypes.forEach(([addr, _]) => {
|
||||
if (typedAttributes[addr] == undefined) {
|
||||
typedAttributes[addr] = [];
|
||||
}
|
||||
typedAttributes[addr].push([entryAddr, entry]);
|
||||
});
|
||||
} else {
|
||||
untypedAttributes.push([entryAddr, entry]);
|
||||
}
|
||||
});
|
||||
attributes.value.forEach(([entryAddr, entry]) => {
|
||||
const entryTypes = Object.entries(allTypes.value).filter(([_, t]) =>
|
||||
t.attributes.includes(entry.attribute)
|
||||
);
|
||||
if (entryTypes.length > 0) {
|
||||
entryTypes.forEach(([addr, _]) => {
|
||||
if (typedAttributes[addr] == undefined) {
|
||||
typedAttributes[addr] = [];
|
||||
}
|
||||
typedAttributes[addr].push([entryAddr, entry]);
|
||||
});
|
||||
} else {
|
||||
untypedAttributes.push([entryAddr, entry]);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
const filteredUntypedAttributes = computed(() => {
|
||||
return untypedAttributes.filter(
|
||||
([_, entry]) =>
|
||||
entry.attribute !== "IS" ||
|
||||
!Object.keys(typedAttributes).includes(entry.value.c)
|
||||
);
|
||||
});
|
||||
|
||||
return {
|
||||
typedAttributes,
|
||||
untypedAttributes,
|
||||
untypedAttributes: filteredUntypedAttributes,
|
||||
backlinks,
|
||||
error,
|
||||
mutate,
|
||||
|
|
Loading…
Reference in New Issue