diff --git a/packages/hoppscotch-common/src/helpers/teams/TeamsSearch.service.ts b/packages/hoppscotch-common/src/helpers/teams/TeamsSearch.service.ts index 9acbf0d2..4d75a395 100644 --- a/packages/hoppscotch-common/src/helpers/teams/TeamsSearch.service.ts +++ b/packages/hoppscotch-common/src/helpers/teams/TeamsSearch.service.ts @@ -404,14 +404,14 @@ export class TeamSearchService extends Service { // has inherited data if (collection.data) { const parentInheritedData = JSON.parse(collection.data) as { - auth: HoppRESTAuth - headers: HoppRESTHeader[] - variables: HoppCollectionVariable[] + auth?: HoppRESTAuth + headers?: HoppRESTHeader[] + variables?: HoppCollectionVariable[] } const inheritedAuth = parentInheritedData.auth - if (inheritedAuth.authType !== "inherit") { + if (inheritedAuth && inheritedAuth.authType !== "inherit") { return E.right({ parentID: collectionID, parentName: collection.title, @@ -448,9 +448,9 @@ export class TeamSearchService extends Service { // see if it has headers to inherit, if yes, add it to the existing headers if (collection.data) { const parentInheritedData = JSON.parse(collection.data) as { - auth: HoppRESTAuth - headers: HoppRESTHeader[] - variables: HoppCollectionVariable[] + auth?: HoppRESTAuth + headers?: HoppRESTHeader[] + variables?: HoppCollectionVariable[] } const inheritedHeaders = parentInheritedData.headers @@ -494,9 +494,9 @@ export class TeamSearchService extends Service { if (collection.data) { const parentData = JSON.parse(collection.data) as { - auth: HoppRESTAuth - headers: HoppRESTHeader[] - variables: HoppCollectionVariable[] + auth?: HoppRESTAuth + headers?: HoppRESTHeader[] + variables?: HoppCollectionVariable[] } const variables = parentData.variables diff --git a/packages/hoppscotch-common/src/services/team-collection.service.ts b/packages/hoppscotch-common/src/services/team-collection.service.ts index dd47b04d..9daad0bb 100644 --- a/packages/hoppscotch-common/src/services/team-collection.service.ts +++ b/packages/hoppscotch-common/src/services/team-collection.service.ts @@ -1144,9 +1144,9 @@ export class TeamCollectionsService extends Service { } const data: { - auth: HoppRESTAuth - headers: HoppRESTHeader[] - variables: HoppCollectionVariable[] + auth?: HoppRESTAuth + headers?: HoppRESTHeader[] + variables?: HoppCollectionVariable[] } = parentFolder.data ? JSON.parse(parentFolder.data) : {