diff --git a/client/src/components/ObjectStore/Instances/CreateForm.test.ts b/client/src/components/ObjectStore/Instances/CreateForm.test.ts index 7339509fc4d2..c5220c9e2196 100644 --- a/client/src/components/ObjectStore/Instances/CreateForm.test.ts +++ b/client/src/components/ObjectStore/Instances/CreateForm.test.ts @@ -16,7 +16,7 @@ const localVue = getLocalVue(true); const STANDARD_TEMPLATE: ObjectStoreTemplateSummary = { type: "s3", name: "moo", - description: undefined, + description: null, variables: [ { name: "myvar", diff --git a/client/src/components/ObjectStore/Instances/UpgradeForm.test.ts b/client/src/components/ObjectStore/Instances/UpgradeForm.test.ts index 9a156e432343..be8bfe4b78f1 100644 --- a/client/src/components/ObjectStore/Instances/UpgradeForm.test.ts +++ b/client/src/components/ObjectStore/Instances/UpgradeForm.test.ts @@ -17,7 +17,7 @@ const router = injectTestRouter(localVue); const STANDARD_TEMPLATE: ObjectStoreTemplateSummary = { type: "s3", name: "moo", - description: undefined, + description: null, variables: [ { name: "oldvar", diff --git a/client/src/stores/objectStoreTemplatesStore.test.ts b/client/src/stores/objectStoreTemplatesStore.test.ts index a27c5b34cadc..2206712b212f 100644 --- a/client/src/stores/objectStoreTemplatesStore.test.ts +++ b/client/src/stores/objectStoreTemplatesStore.test.ts @@ -7,7 +7,7 @@ const TEMPLATES_BASIC = [ { type: s3, name: "moo", - description: undefined, + description: null, variables: [], secrets: [], id: "moo", @@ -20,7 +20,7 @@ const TEMPLATES_EXPANDED = [ { type: s3, name: "Testing S3", - description: undefined, + description: null, variables: [], secrets: [], id: "bucket_s3", @@ -30,7 +30,7 @@ const TEMPLATES_EXPANDED = [ { type: s3, name: "Testing S3 (some more)", - description: undefined, + description: null, variables: [], secrets: [], id: "bucket_s3", @@ -40,7 +40,7 @@ const TEMPLATES_EXPANDED = [ { type: s3, name: "Amazon S3 (working!)", - description: undefined, + description: null, variables: [], secrets: [], id: "bucket_s3", diff --git a/client/src/stores/objectStoreTemplatesStore.ts b/client/src/stores/objectStoreTemplatesStore.ts index 9b985c1b4139..91cd32d9d7ef 100644 --- a/client/src/stores/objectStoreTemplatesStore.ts +++ b/client/src/stores/objectStoreTemplatesStore.ts @@ -18,7 +18,7 @@ function findTemplate(templates: ObjectStoreTemplateSummaries, templateId: strin return null; } -function getLatestVersionMap(templates: ObjectStoreTemplateSummaries) { +function getLatestVersionMap(templates: ObjectStoreTemplateSummaries): { [key: string]: number } { const latestVersions: { [key: string]: number } = {}; templates.forEach((i: ObjectStoreTemplateSummary) => { const templateId = i.id; @@ -66,7 +66,7 @@ export const useObjectStoreTemplatesStore = defineStore("objectStoreTemplatesSto latestTemplates: (state) => { // only expose latest instance by template_version for each template_id const latestVersions = getLatestVersionMap(state.templates); - return state.templates.filter((i) => latestVersions[i.id] == (i.version || 0)); + return state.templates.filter((i:ObjectStoreTemplateSummary) => latestVersions[i.id] == (i.version || 0)); }, canUpgrade: (state) => { return (templateId: string, templateVersion: number) =>