Skip to content

Commit

Permalink
Fix ui
Browse files Browse the repository at this point in the history
  • Loading branch information
ggodlewski committed Sep 2, 2024
1 parent b6cc832 commit 7a7eefa
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions apps/ui/src/components/GitSettings.vue
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,10 @@ export default {
},
computed: {
user_config() {
return this.drive_config.config || {}
return this.drive_config?.config || {};
},
github_url() {
const remote_url = this.drive_config.remote_url || '';
const remote_url = this.drive_config?.remote_url || '';
if (remote_url.startsWith('git@github.com:')) {
return remote_url.replace('git@github.com:', 'https://github.com/')
.replace(/.git$/, '');
Expand All @@ -98,10 +98,10 @@ export default {
},
body: JSON.stringify({
config: this.user_config,
remote_url: this.drive_config.remote_url
remote_url: this.drive_config?.remote_url
})
});
const json = await response.json();
await response.json();
await this.$root.changeDrive(this.driveId);
await this.emit('changed');
},
Expand Down
2 changes: 1 addition & 1 deletion apps/ui/src/components/UserSettings.vue
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ export default {
},
methods: {
async save() {
const response = await this.authenticatedClient.fetchApi(`/api/config/${this.driveId}`, {
await this.authenticatedClient.fetchApi(`/api/config/${this.driveId}`, {
method: 'put',
headers: {
'Content-type': 'application/json'
Expand Down

0 comments on commit 7a7eefa

Please sign in to comment.