diff --git a/src/base/projects/Header.svelte b/src/base/projects/Header.svelte index 7197bb525..f9edb3729 100644 --- a/src/base/projects/Header.svelte +++ b/src/base/projects/Header.svelte @@ -122,8 +122,8 @@ {#if seed.api.host}
navigate(`/seeds/${seed.api.host}`)} title="Project data is fetched from this seed"> + on:click={() => navigate(`/seeds/${seed.api.host}`)} {seed.api.host}
{/if} @@ -134,29 +134,25 @@ on:click={() => toggleContent(ProjectContent.History, true)}> {tree.stats.commits} commit(s) - {#if project.issues > 0} + {#if project.issues}
0} on:click={() => toggleContent(ProjectContent.Issues, false)}> {project.issues} issue(s)
- {:else} -
- 0 issue(s) -
{/if} - {#if project.patches > 0} + {#if project.patches}
0} on:click={() => toggleContent(ProjectContent.Patches, false)}> {project.patches} patch(es)
- {:else} -
- 0 patch(es) -
{/if}
{tree.stats.contributors} contributor(s) diff --git a/src/project.ts b/src/project.ts index 4b71ee82b..e161c6885 100644 --- a/src/project.ts +++ b/src/project.ts @@ -57,8 +57,8 @@ export interface ProjectInfo { defaultBranch: string; delegates: Delegate[]; remotes: PeerId[]; - patches: number; - issues: number; + patches?: number; + issues?: number; } export interface Tree { @@ -267,8 +267,9 @@ export class Project implements ProjectInfo { branches: Branches; profile: Profile | null; anchors: string[]; - patches: number; - issues: number; + // At the moment we still have seed nodes which won't return neither patches or issues + patches?: number; + issues?: number; constructor(urn: string, info: ProjectInfo, seed: Seed, peers: Peer[], branches: Branches, profile: Profile | null, anchors: string[]) { this.urn = urn;