1
0
mirror of https://github.com/sasjs/adapter.git synced 2026-03-10 00:48:11 +00:00

fix: viya, web approach, contexname not added to the url if contains spaces between the words

This commit is contained in:
M
2026-02-06 12:05:02 +01:00
parent 9252e7e384
commit 539fe5f4ed

View File

@@ -97,11 +97,9 @@ export class WebJobExecutor extends BaseJobExecutor {
apiUrl = apiUrl.replace('_program=', '__program=') apiUrl = apiUrl.replace('_program=', '__program=')
} }
// if context name exists and is not blank string // Append context name to URL if provided and non-empty
// then add _contextname variable in apiUrl apiUrl += config.contextName?.trim()
apiUrl += ? `&_contextname=${encodeURIComponent(config.contextName)}`
config.contextName && !/\s/.test(config.contextName)
? `&_contextname=${config.contextName}`
: '' : ''
} }