1
0
mirror of https://github.com/sasjs/adapter.git synced 2026-01-04 19:20:05 +00:00

fix: call sasJsJobExecutor only from cli

This commit is contained in:
2022-02-21 23:08:55 +05:00
parent 35f37ac796
commit 9ca4732f76
2 changed files with 6 additions and 2 deletions

View File

@@ -683,7 +683,10 @@ export default class SASjs {
const validationResult = this.validateInput(data)
if (validationResult.status) {
if (config.serverType === ServerType.Sasjs) {
if (
config.serverType === ServerType.Sasjs &&
typeof FormData === 'undefined'
) {
return await this.sasJsJobExecutor!.execute(
sasJob,
data,
@@ -693,7 +696,7 @@ export default class SASjs {
extraResponseAttributes
)
} else if (
config.serverType !== ServerType.Sas9 &&
config.serverType === ServerType.SasViya &&
config.useComputeApi !== undefined &&
config.useComputeApi !== null
) {

View File

@@ -108,6 +108,7 @@ export class WebJobExecutor extends BaseJobExecutor {
...this.getRequestParams(config)
}
// FormData is only valid in browser
let formData = new FormData()
if (data) {