fix: restore fitvids once and for all

This commit is contained in:
Damillora 2022-07-24 06:21:11 +07:00
parent 1b061ac55a
commit 745f174ed2

View File

@ -46,18 +46,14 @@
import { browser } from '$app/env'; import { browser } from '$app/env';
import PostSeo from '$lib/components/SEO/PostSEO.svelte'; import PostSeo from '$lib/components/SEO/PostSEO.svelte';
import { onMount } from 'svelte'; import { onMount } from 'svelte';
import { afterNavigate } from '$app/navigation';
export let post: any; export let post: any;
export let prevPost: any; export let prevPost: any;
export let nextPost: any; export let nextPost: any;
export let relatedPost: any[]; export let relatedPost: any[];
$: if (post) { afterNavigate(() => {
if (browser) {
fitvids();
}
}
onMount(() => {
if (browser) { if (browser) {
fitvids(); fitvids();
} }