fix(common): resolve TypeError when opening request from search results (#5842)
Co-authored-by: James George <25279263+jamesgeorge007@users.noreply.github.com>
This commit is contained in:
parent
b9064045e8
commit
77e420dc6a
2 changed files with 13 additions and 13 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -1144,9 +1144,9 @@ export class TeamCollectionsService extends Service<void> {
|
|||
}
|
||||
|
||||
const data: {
|
||||
auth: HoppRESTAuth
|
||||
headers: HoppRESTHeader[]
|
||||
variables: HoppCollectionVariable[]
|
||||
auth?: HoppRESTAuth
|
||||
headers?: HoppRESTHeader[]
|
||||
variables?: HoppCollectionVariable[]
|
||||
} = parentFolder.data
|
||||
? JSON.parse(parentFolder.data)
|
||||
: {
|
||||
|
|
|
|||
Loading…
Reference in a new issue