This is an automated email from the ASF dual-hosted git repository.
dominikriemer pushed a commit to branch dev
in repository https://gitbox.apache.org/repos/asf/streampipes.git
The following commit(s) were added to refs/heads/dev by this push:
new 064c5f50a2 fix: Check asset links for null values before sorting
(#4580)
064c5f50a2 is described below
commit 064c5f50a243b5d26bdc67d0a7683c2d618f709b
Author: Dominik Riemer <[email protected]>
AuthorDate: Tue Jun 16 17:53:33 2026 +0200
fix: Check asset links for null values before sorting (#4580)
---
ui/src/app/home/home.component.ts | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/ui/src/app/home/home.component.ts
b/ui/src/app/home/home.component.ts
index a73f4303aa..892be4b897 100644
--- a/ui/src/app/home/home.component.ts
+++ b/ui/src/app/home/home.component.ts
@@ -171,13 +171,15 @@ export class HomeComponent implements OnInit, OnDestroy {
sortAssetLinks(assets: SpAssetModel[]) {
assets.forEach(asset => {
- asset.assetLinks = [...asset.assetLinks].sort((a, b) => {
- const typeCompare = a.linkType.localeCompare(b.linkType);
+ asset.assetLinks = [...(asset.assetLinks ?? [])].sort((a, b) => {
+ const leftType = a.linkType ?? '';
+ const rightType = b.linkType ?? '';
+ const typeCompare = leftType.localeCompare(rightType);
if (typeCompare !== 0) {
return typeCompare;
}
- return a.linkLabel.localeCompare(b.linkLabel);
+ return (a.linkLabel ?? '').localeCompare(b.linkLabel ?? '');
});
});
}