Skip to content

Commit

Permalink
Removed duplicate logic in internalLinks.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
Not-Abram committed Dec 6, 2024
1 parent 6c3ddb6 commit 11b0e98
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions packages/viewer/src/parser/internalLinks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,9 @@ export function internal(
const { sid, pid } = match.groups
const space = spaces.find(Number(sid))
const property = properties.find(Number(pid))
const trait = space && property && traits.find(space, property)
const connector =
trait?.value === true
? 'is'
: trait?.value === false
? 'is not'
: '?'
return {
href: `/spaces/S${sid}/properties/P${pid}`,
title: `${space ? space.name : 'S' + sid} ${connector} ${
property ? property.name : 'P' + pid
}`,
title: `${traits.findName(sid, pid)}`,
}
}

Expand Down

0 comments on commit 11b0e98

Please sign in to comment.