1
0
mirror of https://github.com/sasjs/adapter.git synced 2026-01-15 16:10:06 +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) const validationResult = this.validateInput(data)
if (validationResult.status) { if (validationResult.status) {
if (config.serverType === ServerType.Sasjs) { if (
config.serverType === ServerType.Sasjs &&
typeof FormData === 'undefined'
) {
return await this.sasJsJobExecutor!.execute( return await this.sasJsJobExecutor!.execute(
sasJob, sasJob,
data, data,
@@ -693,7 +696,7 @@ export default class SASjs {
extraResponseAttributes extraResponseAttributes
) )
} else if ( } else if (
config.serverType !== ServerType.Sas9 && config.serverType === ServerType.SasViya &&
config.useComputeApi !== undefined && config.useComputeApi !== undefined &&
config.useComputeApi !== null config.useComputeApi !== null
) { ) {

View File

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