diff --git a/package-lock.json b/package-lock.json index a2f428663..fc80f52f9 100644 --- a/package-lock.json +++ b/package-lock.json @@ -26,7 +26,7 @@ "@ngrx/effects": "^16", "@ngrx/router-store": "^16", "@ngrx/store": "^16", - "@scicatproject/scicat-sdk-ts": "^4.7.2", + "@scicatproject/scicat-sdk-ts": "^4.8.3", "autolinker": "^4.0.0", "deep-equal": "^2.0.5", "exceljs": "^4.3.0", @@ -4988,9 +4988,9 @@ } }, "node_modules/@scicatproject/scicat-sdk-ts": { - "version": "4.7.2", - "resolved": "https://registry.npmjs.org/@scicatproject/scicat-sdk-ts/-/scicat-sdk-ts-4.7.2.tgz", - "integrity": "sha512-1WhHnL+YPY6hPxzWOHJf2A6eL0a6WmTar0zX8EQbG9ZUMbFwVjIdtTZGzJrCjd42d+b5lHI2aAB2ZAymN5Qczw==", + "version": "4.8.3", + "resolved": "https://registry.npmjs.org/@scicatproject/scicat-sdk-ts/-/scicat-sdk-ts-4.8.3.tgz", + "integrity": "sha512-4X6mOG98OXFFeECr/vChDzENKjbGlLdv5XsaxWPq6iZOiALP/mbyE746SbfmUI0cD7hLK1GvSzTid2Jr7Fo1nQ==", "dependencies": { "tslib": "^2.3.0" }, diff --git a/package.json b/package.json index 53f936cb9..dc5dfeda7 100644 --- a/package.json +++ b/package.json @@ -34,7 +34,7 @@ "@ngrx/effects": "^16", "@ngrx/router-store": "^16", "@ngrx/store": "^16", - "@scicatproject/scicat-sdk-ts": "^4.7.2", + "@scicatproject/scicat-sdk-ts": "^4.8.3", "autolinker": "^4.0.0", "deep-equal": "^2.0.5", "exceljs": "^4.3.0", diff --git a/src/app/datasets/dataset-details-dashboard/dataset-details-dashboard.component.ts b/src/app/datasets/dataset-details-dashboard/dataset-details-dashboard.component.ts index 52b505b6a..aa2b8dcec 100644 --- a/src/app/datasets/dataset-details-dashboard/dataset-details-dashboard.component.ts +++ b/src/app/datasets/dataset-details-dashboard/dataset-details-dashboard.component.ts @@ -260,27 +260,24 @@ export class DatasetDetailsDashboardComponent fetchDatasetRelatedDocuments(): void { if (this.dataset) { - if ("proposalId" in this.dataset && this.dataset["proposalId"] !== "") { + if ("proposalId" in this.dataset && this.dataset.proposalId) { this.store.dispatch( fetchProposalAction({ - proposalId: this.dataset["proposalId"] as string, + proposalId: this.dataset.proposalId, }), ); } else { this.store.dispatch(clearLogbookAction()); } - if ("sampleId" in this.dataset && this.dataset["sampleId"] !== "") { + if ("sampleId" in this.dataset && this.dataset.sampleId) { this.store.dispatch( - fetchSampleAction({ sampleId: this.dataset["sampleId"] as string }), + fetchSampleAction({ sampleId: this.dataset.sampleId }), ); } - if ( - "instrumentId" in this.dataset && - this.dataset["instrumentId"] !== "" - ) { + if ("instrumentId" in this.dataset && this.dataset.instrumentId) { this.store.dispatch( fetchInstrumentAction({ - pid: this.dataset["instrumentId"] as string, + pid: this.dataset.instrumentId, }), ); }