Skip to content

Commit

Permalink
fix(data): Data(files) table views no longer crashes when every data(…
Browse files Browse the repository at this point in the history
…file) has an undefined target

OpenSILEX/opensilex-dev!1190
  • Loading branch information
Crejak committed Mar 7, 2024
1 parent 2168505 commit f2a1568
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions opensilex-front/front/src/components/data/DataFilesList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -201,11 +201,11 @@ export default class DataFilesList extends Vue {
/**
* Construct paths for each target's UriLink components according to their type.
*/
loadObjectsPath() {
private loadObjectsPath(): Promise<unknown> {
// ensure that at least one object has been loaded (in case where all data in the page have no target)
let objectURIs = Object.keys(this.objects);
if (!objectURIs || objectURIs.length == 0) {
return;
return Promise.resolve();
}
return this.ontologyService
Expand Down
4 changes: 2 additions & 2 deletions opensilex-front/front/src/components/data/DataList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -334,12 +334,12 @@ export default class DataList extends Vue {
/**
* Construct paths for each target's UriLink components according to their type.
*/
loadObjectsPath() {
private loadObjectsPath(): Promise<unknown> {
// ensure that at least one object has been loaded (in case where all data in the page have no target)
let objectURIs = Object.keys(this.objects);
if (!objectURIs || objectURIs.length == 0) {
return;
return Promise.resolve();
}
return this.ontologyService
Expand Down

0 comments on commit f2a1568

Please sign in to comment.