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
|
// has inherited data
|
||||||
if (collection.data) {
|
if (collection.data) {
|
||||||
const parentInheritedData = JSON.parse(collection.data) as {
|
const parentInheritedData = JSON.parse(collection.data) as {
|
||||||
auth: HoppRESTAuth
|
auth?: HoppRESTAuth
|
||||||
headers: HoppRESTHeader[]
|
headers?: HoppRESTHeader[]
|
||||||
variables: HoppCollectionVariable[]
|
variables?: HoppCollectionVariable[]
|
||||||
}
|
}
|
||||||
|
|
||||||
const inheritedAuth = parentInheritedData.auth
|
const inheritedAuth = parentInheritedData.auth
|
||||||
|
|
||||||
if (inheritedAuth.authType !== "inherit") {
|
if (inheritedAuth && inheritedAuth.authType !== "inherit") {
|
||||||
return E.right({
|
return E.right({
|
||||||
parentID: collectionID,
|
parentID: collectionID,
|
||||||
parentName: collection.title,
|
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
|
// see if it has headers to inherit, if yes, add it to the existing headers
|
||||||
if (collection.data) {
|
if (collection.data) {
|
||||||
const parentInheritedData = JSON.parse(collection.data) as {
|
const parentInheritedData = JSON.parse(collection.data) as {
|
||||||
auth: HoppRESTAuth
|
auth?: HoppRESTAuth
|
||||||
headers: HoppRESTHeader[]
|
headers?: HoppRESTHeader[]
|
||||||
variables: HoppCollectionVariable[]
|
variables?: HoppCollectionVariable[]
|
||||||
}
|
}
|
||||||
|
|
||||||
const inheritedHeaders = parentInheritedData.headers
|
const inheritedHeaders = parentInheritedData.headers
|
||||||
|
|
@ -494,9 +494,9 @@ export class TeamSearchService extends Service {
|
||||||
|
|
||||||
if (collection.data) {
|
if (collection.data) {
|
||||||
const parentData = JSON.parse(collection.data) as {
|
const parentData = JSON.parse(collection.data) as {
|
||||||
auth: HoppRESTAuth
|
auth?: HoppRESTAuth
|
||||||
headers: HoppRESTHeader[]
|
headers?: HoppRESTHeader[]
|
||||||
variables: HoppCollectionVariable[]
|
variables?: HoppCollectionVariable[]
|
||||||
}
|
}
|
||||||
|
|
||||||
const variables = parentData.variables
|
const variables = parentData.variables
|
||||||
|
|
|
||||||
|
|
@ -1144,9 +1144,9 @@ export class TeamCollectionsService extends Service<void> {
|
||||||
}
|
}
|
||||||
|
|
||||||
const data: {
|
const data: {
|
||||||
auth: HoppRESTAuth
|
auth?: HoppRESTAuth
|
||||||
headers: HoppRESTHeader[]
|
headers?: HoppRESTHeader[]
|
||||||
variables: HoppCollectionVariable[]
|
variables?: HoppCollectionVariable[]
|
||||||
} = parentFolder.data
|
} = parentFolder.data
|
||||||
? JSON.parse(parentFolder.data)
|
? JSON.parse(parentFolder.data)
|
||||||
: {
|
: {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue