Skip to content

Commit

Permalink
Merge pull request #1282 from Itemshopp/patch-1
Browse files Browse the repository at this point in the history
Correction of issue in EmbedImage and FeaturedImage when path is empty
  • Loading branch information
austintoddj authored Jun 21, 2023
2 parents 34a129e + 32d4b8e commit d5a3614
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 d5a3614

Please sign in to comment.