From b1532b5f3c9e4630b43e607f8fabf572e028a01f Mon Sep 17 00:00:00 2001 From: David Date: Thu, 20 Jul 2023 17:18:59 -0700 Subject: [PATCH] Simplified and fixed and/or oopsie --- src/components/still-image/still-image.js | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/components/still-image/still-image.js b/src/components/still-image/still-image.js index 5a496e70..81da126a 100644 --- a/src/components/still-image/still-image.js +++ b/src/components/still-image/still-image.js @@ -11,17 +11,13 @@ const StillImage = { ], data () { return { - stopGifs: this.$store.getters.mergedConfig.stopGifs, + stopGifs: this.$store.getters.mergedConfig.stopGifs || window.matchMedia('(prefers-reduced-motion: reduce)').matches, isAnimated: false, - prefersReducedMotion: true } }, - created () { - this.prefersReducedMotion = window.matchMedia('(prefers-reduced-motion: reduce)').matches - }, computed: { animated () { - return this.stopGifs && this.isAnimated && this.prefersReducedMotion + return this.stopGifs && this.isAnimated }, style () { const appendPx = (str) => /\d$/.test(str) ? str + 'px' : str