1
0
mirror of https://github.com/sasjs/adapter.git synced 2025-12-11 01:14:36 +00:00

Compare commits

...

1 Commits

Author SHA1 Message Date
sabir_hassan
591e1ebc09 fix: callback type checking fixes #304 2021-05-27 21:59:40 +05:00

View File

@@ -550,7 +550,10 @@ export default class SASjs {
...this.sasjsConfig,
...config
}
if (
typeof loginRequiredCallback === 'function' ||
typeof loginRequiredCallback === 'undefined'
) {
if (config.serverType === ServerType.SasViya && config.contextName) {
if (config.useComputeApi) {
return await this.computeJobExecutor!.execute(
@@ -577,6 +580,13 @@ export default class SASjs {
loginRequiredCallback
)
}
} else {
return Promise.reject(
new ErrorResponse(
`Invalid loginRequiredCallback parameter was provided. Expected Callback function but found ${typeof loginRequiredCallback}`
)
)
}
}
/**