replace bang with question mark in html (#1683)

This commit is contained in:
Matt Hill
2022-07-25 12:05:44 -06:00
committed by GitHub
parent 37657fa6ad
commit 83fe391796
2 changed files with 5 additions and 5 deletions

View File

@@ -84,7 +84,7 @@
<h2>
<b>
<span *ngIf="not['package-id'] as pkgId">
{{ packageData[pkgId]?.manifest!.title || pkgId }} -
{{ packageData[pkgId]?.manifest?.title || pkgId }} -
</span>
<ion-text [color]="getColor(not)"> {{ not.title }} </ion-text>
</b>
@@ -112,7 +112,7 @@
View Report
</ion-button>
<ion-button
*ngIf="not['package-id']"
*ngIf="not['package-id'] && packageData[not['package-id']]"
slot="end"
fill="clear"
color="dark"

View File

@@ -1,7 +1,7 @@
import { PackageDataEntry } from '../services/patch-db/data-model'
export function hasCurrentDeps(pkg: PackageDataEntry): boolean {
return !!Object.keys(pkg.installed?.['current-dependents'] || {})
// @TODO fix Manifest type
.filter(depId => depId !== (pkg.manifest as any).id).length
return !!Object.keys(pkg.installed?.['current-dependents'] || {}).filter(
depId => depId !== pkg.manifest.id,
).length
}