Skip to content

Commit

Permalink
feat: add keys to media so they are switched instantly
Browse files Browse the repository at this point in the history
  • Loading branch information
AlejandroAkbal committed Jun 26, 2021
1 parent a612f3d commit aa7c4f7
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions components/pages/posts/post/Post.vue
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
@keydown.enter="toggleTags"
>
<img
:key="mediaResolutionChooser.url"
:src="mediaResolutionChooser.url"
:height="mediaResolutionChooser.height"
:width="mediaResolutionChooser.width"
Expand All @@ -47,6 +48,7 @@
<template v-else-if="isVideo">
<div class="relative">
<video
:key="mediaResolutionChooser.url"
:alt="'Video ' + post.data.id"
:poster="post.data.preview_file.url"
preload="none"
Expand Down

0 comments on commit aa7c4f7

Please sign in to comment.