Skip to content

Commit

Permalink
feat: plugin type when title is empty
Browse files Browse the repository at this point in the history
  • Loading branch information
simon-scherzinger committed Aug 1, 2019
1 parent 4616336 commit 4675445
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/resources/apps/CodeSourceResource.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ class CodeSourceResource extends Resource {
},
title: {
enumerable: false,
get: () => <string>(this.getProperty('config') || {})._title,
get: () => <string>(this.getProperty('config') || {})._title || this.codeSourceType,
set: (value: string) =>
this.setProperty('config', Object.assign(this.getProperty('config') || {}, { _title: value || null })),
},
Expand Down
2 changes: 1 addition & 1 deletion src/resources/apps/DataSourceResource.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ class DataSourceResource extends Resource {
},
title: {
enumerable: false,
get: () => <string>(this.getProperty('config') || {})._title,
get: () => <string>(this.getProperty('config') || {})._title || this.dataSourceType,
set: (value: string) =>
this.setProperty('config', Object.assign(this.getProperty('config') || {}, { _title: value || null })),
},
Expand Down
2 changes: 1 addition & 1 deletion src/resources/apps/TargetResource.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ class TargetResource extends Resource {
},
title: {
enumerable: false,
get: () => <string>(this.getProperty('config') || {})._title,
get: () => <string>(this.getProperty('config') || {})._title || this.targetType,
set: (value: string) =>
this.setProperty('config', Object.assign(this.getProperty('config') || {}, { _title: value || null })),
},
Expand Down

0 comments on commit 4675445

Please sign in to comment.