@sasjs/adapter 4.16.1 → 4.16.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -83,5 +83,5 @@
83
83
  "https": "1.0.0",
84
84
  "tough-cookie": "4.1.3"
85
85
  },
86
- "version": "4.16.1"
86
+ "version": "4.16.2"
87
87
  }
@@ -97,12 +97,10 @@ export class WebJobExecutor extends BaseJobExecutor {
97
97
  apiUrl = apiUrl.replace('_program=', '__program=')
98
98
  }
99
99
 
100
- // if context name exists and is not blank string
101
- // then add _contextname variable in apiUrl
102
- apiUrl +=
103
- config.contextName && !/\s/.test(config.contextName)
104
- ? `&_contextname=${config.contextName}`
105
- : ''
100
+ // Append context name to URL if provided and non-empty
101
+ apiUrl += config.contextName?.trim()
102
+ ? `&_contextname=${encodeURIComponent(config.contextName)}`
103
+ : ''
106
104
  }
107
105
 
108
106
  let requestParams = {