mirror of
https://github.com/maelgangloff/domain-watchdog.git
synced 2025-12-17 09:45:29 +00:00
fix: remove deleted DomainEntities on diagram
This commit is contained in:
parent
c3a6129dcb
commit
b4aef61de2
@ -7,7 +7,7 @@ import {rolesToColor} from "../../../../utils/functions/rolesToColor";
|
||||
export function domainEntitiesToEdges(d: Domain, withRegistrar = false) {
|
||||
const rdapRoleTranslated = rdapRoleTranslation()
|
||||
return d.entities
|
||||
.filter(e => !withRegistrar ? !e.roles.includes('registrar') : true)
|
||||
.filter(e => !e.deleted && (!withRegistrar ? !e.roles.includes('registrar') : true))
|
||||
.map(e => ({
|
||||
id: `e-${d.ldhName}-${e.entity.handle}`,
|
||||
source: e.roles.includes('registrant') || e.roles.includes('registrar') ? e.entity.handle : d.ldhName,
|
||||
|
||||
@ -13,7 +13,7 @@ export const domainToNode = (d: Domain) => ({
|
||||
})
|
||||
|
||||
export const domainEntitiesToNode = (d: Domain, withRegistrar = false) => d.entities
|
||||
.filter(e => !withRegistrar ? !e.roles.includes('registrar') : true)
|
||||
.filter(e => !e.deleted && (!withRegistrar ? !e.roles.includes('registrar') : true))
|
||||
.map(e => {
|
||||
return {
|
||||
id: e.entity.handle,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user