Skip to content

Commit

Permalink
Merge pull request #366 from sasjs/fix-sasjs-config
Browse files Browse the repository at this point in the history
fix: sasjs config fixed
  • Loading branch information
allanbowe authored Jul 28, 2022
2 parents 9ea7fcd + 50db44a commit 848a07c
Show file tree
Hide file tree
Showing 3 changed files with 127 additions and 11 deletions.
130 changes: 123 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"@material-ui/lab": "^4.0.0-alpha.60",
"@mui/icons-material": "^5.8.2",
"@mui/material": "^5.2.6",
"@sasjs/adapter": "^3.10.8",
"@sasjs/adapter": "^3.10.10",
"@sasjs/core": "^4.34.1",
"@sasjs/utils": "^2.47.0",
"axios": "^0.27.2",
Expand Down
6 changes: 3 additions & 3 deletions src/context/sasContext.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,17 +32,17 @@ const useComputeApi = sasElement?.getAttribute('useComputeApi')

const sasjsConfig = {
serverUrl: sasElement?.getAttribute('serverUrl') ?? undefined,
appLoc: sasElement?.getAttribute('appLoc') ?? undefined,
appLoc: sasElement?.getAttribute('appLoc') ?? '',
serverType: sasElement?.getAttribute('serverType'),
debug: sasElement?.getAttribute('debug') === 'true',
loginMechanism: sasElement?.getAttribute('loginMechanism') ?? undefined,
loginMechanism: sasElement?.getAttribute('loginMechanism') ?? 'Default',
useComputeApi:
useComputeApi === 'true'
? true
: useComputeApi === 'false'
? false
: useComputeApi,
contextName: sasElement?.getAttribute('contextName') ?? undefined
contextName: sasElement?.getAttribute('contextName') ?? ''
} as SASjsConfig

const sasService = new SASjs(sasjsConfig)
Expand Down

0 comments on commit 848a07c

Please sign in to comment.