web/admin: fix blueprint instance list without metadata or labels (#5296)
* Update BlueprintListPage.ts `Object.hasOwn()` throws an exception if the first argument is `null` or `undefined`. This change ensures that the first argument is never `null` or `undefined`. Signed-off-by: cskwrd <cskwrd@users.noreply.github.com> * Update web/src/admin/blueprints/BlueprintListPage.ts Signed-off-by: Jens L. <jens@beryju.org> Signed-off-by: Jens Langhammer <jens@goauthentik.io> --------- Signed-off-by: cskwrd <cskwrd@users.noreply.github.com> Signed-off-by: Jens L. <jens@beryju.org> Signed-off-by: Jens Langhammer <jens@goauthentik.io> Co-authored-by: Jens L <jens@beryju.org>
This commit is contained in:
parent
9ac6511548
commit
04cc7817ee
|
@ -126,7 +126,11 @@ export class BlueprintListPage extends TablePage<BlueprintInstance> {
|
|||
row(item: BlueprintInstance): TemplateResult[] {
|
||||
let description = undefined;
|
||||
const descKey = "blueprints.goauthentik.io/description";
|
||||
if (Object.hasOwn(item.metadata?.labels, descKey)) {
|
||||
if (
|
||||
item.metadata &&
|
||||
item.metadata.labels &&
|
||||
Object.hasOwn(item.metadata?.labels, descKey)
|
||||
) {
|
||||
description = item.metadata?.labels[descKey];
|
||||
}
|
||||
return [
|
||||
|
|
Reference in New Issue