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

Compare commits

...

4 Commits

Author SHA1 Message Date
Krishna Acondy
2cdab7522d Merge pull request #139 from sasjs/location-issue
fix(location): added handle cases when 'location' is not defined
2020-10-29 08:07:11 +00:00
Yury Shkoda
a07eabc408 fix(location): added handle cases when 'location' is not defined 2020-10-29 10:07:30 +03:00
Yury Shkoda
d5920c5885 Merge pull request #134 from sasjs/executeComputeJob
fix(executeComputeJob): added fix for cases when code was not provided
2020-10-21 11:55:43 +03:00
Yury Shkoda
6a3a6b4485 fix(executeComputeJob): added fix for cases when code was not provided 2020-10-21 11:45:21 +03:00
2 changed files with 10 additions and 4 deletions

View File

@@ -1032,6 +1032,8 @@ export class SASViyaApiClient {
jobToExecute.code = code jobToExecute.code = code
} }
if (!code) code = ''
const linesToExecute = code.replace(/\r\n/g, '\n').split('\n') const linesToExecute = code.replace(/\r\n/g, '\n').split('\n')
return await this.executeScript( return await this.executeScript(
sasJob, sasJob,

View File

@@ -1365,11 +1365,15 @@ export default class SASjs {
this.sasjsConfig.serverUrl === undefined || this.sasjsConfig.serverUrl === undefined ||
this.sasjsConfig.serverUrl === '' this.sasjsConfig.serverUrl === ''
) { ) {
let url = `${location.protocol}//${location.hostname}` if (typeof location !== 'undefined') {
if (location.port) { let url = `${location.protocol}//${location.hostname}`
url = `${url}:${location.port}`
if (location.port) url = `${url}:${location.port}`
this.sasjsConfig.serverUrl = url
} else {
this.sasjsConfig.serverUrl = ''
} }
this.sasjsConfig.serverUrl = url
} }
if (this.sasjsConfig.serverUrl.slice(-1) === '/') { if (this.sasjsConfig.serverUrl.slice(-1) === '/') {