Skip to content

Commit

Permalink
Merge pull request #10831 from Budibase/fix/save-rest-connector
Browse files Browse the repository at this point in the history
Fix/save rest connector
  • Loading branch information
shogunpurple committed Jun 8, 2023
2 parents 3e1a570 + 520e52f commit a1afbc8
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
}
async function saveDatasource() {
if (integration.features[DatasourceFeature.CONNECTION_CHECKING]) {
if (integration.features?.[DatasourceFeature.CONNECTION_CHECKING]) {
const valid = await validateConfig()
if (!valid) {
return false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
}
const saveDatasource = async () => {
if (integration.features[DatasourceFeature.CONNECTION_CHECKING]) {
if (integration.features?.[DatasourceFeature.CONNECTION_CHECKING]) {
const valid = await validateConfig()
if (!valid) {
return false
Expand Down
2 changes: 1 addition & 1 deletion packages/server/src/sdk/app/datasources/datasources.ts
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ export function mergeConfigs(update: Datasource, old: Datasource) {
// specific to REST datasources, fix the auth configs again if required
if (hasAuthConfigs(update)) {
const configs = update.config.authConfigs as RestAuthConfig[]
const oldConfigs = old.config?.authConfigs as RestAuthConfig[]
const oldConfigs = old.config?.authConfigs as RestAuthConfig[] || []
for (let config of configs) {
if (config.type !== RestAuthType.BASIC) {
continue
Expand Down

0 comments on commit a1afbc8

Please sign in to comment.