Skip to content

Commit

Permalink
refactor(component-library): replace deepClone
Browse files Browse the repository at this point in the history
  • Loading branch information
Haberkamp committed Jan 17, 2025
1 parent b75165d commit e06c013
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
</template>

<script setup lang="ts">
import cloneDeep from "lodash-es/cloneDeep";
import MtIcon from "../mt-icon/mt-icon.vue";
import { reactive, computed, onMounted, ref, watch, nextTick, type CSSProperties } from "vue";
Expand Down Expand Up @@ -98,7 +97,7 @@ const avatarImage = computed<CSSProperties>(() => {
return {};
}
const avatarMedia = cloneDeep(props.sourceContext.avatarMedia);
const avatarMedia = structuredClone(props.sourceContext.avatarMedia);
const thumbnailImage = avatarMedia.thumbnails.sort((a, b) => a.width - b.width)[0];
const previewImageUrl = thumbnailImage ? thumbnailImage.url : avatarMedia.url;
Expand Down

0 comments on commit e06c013

Please sign in to comment.