Skip to content

Commit

Permalink
core: frontend: VehicleBanner: Fix custom vehicle and company logic
Browse files Browse the repository at this point in the history
Signed-off-by: Patrick José Pereira <[email protected]>
  • Loading branch information
patrickelectric committed Aug 20, 2024
1 parent 9156840 commit ca12761
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions core/frontend/src/components/app/VehicleBanner.vue
Original file line number Diff line number Diff line change
Expand Up @@ -121,14 +121,14 @@ export default Vue.extend({
},
methods: {
async load_vehicle_image() {
this.vehicle_image = (await bag.getData('vehicle.image_path'))?.url as string
if (!this.vehicle_image.startsWith('/')) {
this.vehicle_image = (await bag.getData('vehicle.image_path'))?.url as (string | undefined)
if (this.vehicle_image && !this.vehicle_image.startsWith('/')) {
this.vehicle_image = `/${this.vehicle_image}`
}
},
async load_company_logo() {
this.logo_image = (await bag.getData('vehicle.logo_image_path'))?.url as string
if (!this.logo_image.startsWith('/')) {
this.logo_image = (await bag.getData('vehicle.logo_image_path'))?.url as (string | undefined)
if (this.logo_image && !this.logo_image.startsWith('/')) {
this.logo_image = `/${this.vehicle_image}`
}
},
Expand Down

0 comments on commit ca12761

Please sign in to comment.