fix: cycles
This commit is contained in:
parent
7567efe48e
commit
b9b956c408
|
@ -22,7 +22,7 @@ export class Context {
|
|||
|
||||
static allTypesInvertedDigraph() {
|
||||
const digraph = this.allTypesDigraph();
|
||||
const inverted = {};
|
||||
let inverted = {};
|
||||
const fromTypes = Object.keys(digraph);
|
||||
for (let i = 0; i < fromTypes.length; i++) {
|
||||
const fromType = fromTypes[i];
|
||||
|
@ -33,7 +33,12 @@ export class Context {
|
|||
inverted[toType][fromType] = true;
|
||||
}
|
||||
}
|
||||
return mapObject(inverted, (types) => Object.keys(types));
|
||||
inverted = mapObject(inverted, (types) => Object.keys(types));
|
||||
inverted = mapObject(
|
||||
inverted,
|
||||
(types) => arrayUnique(flatten(types.map((type) => (inverted[type] || []).concat(type)))),
|
||||
);
|
||||
return inverted;
|
||||
}
|
||||
|
||||
static describe(description, fn) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user