Skip to content

Commit

Permalink
fix: replace path to relative in vc-shape
Browse files Browse the repository at this point in the history
  • Loading branch information
NaMax66 committed Dec 27, 2024
1 parent 46afe22 commit a62a2a9
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion client-app/ui-kit/components/molecules/shape/vc-shape.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

<script setup lang="ts">
import { computed, ref, watch } from "vue";
import { Logger } from "@/core/utilities";
interface IProps {
size?: number | string;
Expand All @@ -33,7 +34,16 @@ const style = computed(() => ({
}));
function loadIcon(name?: string) {
iconUrl.value = new URL(`/client-app/assets/icons/basic/${name}.svg`, import.meta.url).href ?? "";
if (name) {
try {
iconUrl.value = new URL(`../../../../assets/icons/basic/${name}.svg`, import.meta.url).href;
} catch (error) {
Logger.error(`Failed to load icon: ${name}`, error);
iconUrl.value = "";
}
} else {
iconUrl.value = "";
}
}
watch(
Expand Down

0 comments on commit a62a2a9

Please sign in to comment.