1
0
mirror of https://github.com/sasjs/adapter.git synced 2025-12-11 09:24:35 +00:00

fix: error when multiple redirections happen while debug is on

This commit is contained in:
2022-08-24 15:12:13 +02:00
parent a0b8316d7c
commit d8b686dd7e

View File

@@ -154,9 +154,12 @@ export class RequestClient implements HttpClient {
sasWork = log
}
} else if (response?.result) {
sourceCode = parseSourceCode(response.result)
generatedCode = parseGeneratedCode(response.result)
sasWork = response.result.WORK
// We parse only if it's a string, otherwise it would throw error
if (typeof response.result === 'string') {
sourceCode = parseSourceCode(response.result)
generatedCode = parseGeneratedCode(response.result)
sasWork = response.result.WORK
}
}
}