Skip to content

Commit

Permalink
Corrected bug when CANVAS_PATH is empty in EmbedImageModal and Featur…
Browse files Browse the repository at this point in the history
…edImageModal
  • Loading branch information
MHO committed Jun 1, 2023
1 parent fd32e79 commit 32d4b8e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion resources/js/components/editor/EmbedImageModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ export default {
getServerOptions() {
return {
url: `${this.settings.path}/api/uploads`,
url: this.settings.path !== '/' ? `${this.settings.path}/api/uploads` : '/api/uploads',
headers: {
'X-CSRF-TOKEN': document.head.querySelector('meta[name="csrf-token"]').content,
},
Expand Down
4 changes: 2 additions & 2 deletions resources/js/components/modals/AvatarModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -106,9 +106,9 @@ export default {
}),
getServerOptions() {
return {
// TODO: This check shouldn't need to be here
url: this.settings.path === '/' ? `/api/uploads` : `${this.settings.path}/api/uploads`,
url: this.settings.path !== '/' ? `${this.settings.path}/api/uploads` : '/api/uploads',
headers: {
'X-CSRF-TOKEN': document.head.querySelector('meta[name="csrf-token"]').content,
},
Expand Down
2 changes: 1 addition & 1 deletion resources/js/components/modals/FeaturedImageModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ export default {
getServerOptions() {
return {
url: `${this.settings.path}/api/uploads`,
url: this.settings.path !== '/' ? `${this.settings.path}/api/uploads` : '/api/uploads',
headers: {
'X-CSRF-TOKEN': document.head.querySelector('meta[name="csrf-token"]').content,
},
Expand Down

0 comments on commit 32d4b8e

Please sign in to comment.