From 02b487a59f6411d3f557777634478ceac4549028 Mon Sep 17 00:00:00 2001 From: Solomon Cammack Date: Sat, 15 Jun 2024 06:08:20 +0100 Subject: [PATCH] Fix squeezable on production environments (#254) --- website/src/components/broadcast/Squeezable.vue | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/website/src/components/broadcast/Squeezable.vue b/website/src/components/broadcast/Squeezable.vue index f3761ac8..dcd0e5bb 100644 --- a/website/src/components/broadcast/Squeezable.vue +++ b/website/src/components/broadcast/Squeezable.vue @@ -1,6 +1,6 @@ @@ -32,7 +32,7 @@ export default { methods: { updateWidth(isAfterTick) { const big = this.$refs.big; - const small = this.$slots.default?.()?.[0]?.el || big?.__vnode?.children?.[0]?.children?.[0]?.el || big?.__vnode?.children?.[0]?.el; + const small = this.$el?.children?.[0]; // console.log({ big, small }); if (!big?.getBoundingClientRect || !small?.getBoundingClientRect) return; @@ -49,7 +49,7 @@ export default { if (!isAfterTick) this.$nextTick(() => this.updateWidth(true)); }, observerUpdate(...a) { - // console.log(a); + // console.log("observer update", a); this.updateWidth(); } }, @@ -58,7 +58,7 @@ export default { this.elementObserver.observe(this.$refs.big); const mutationObserver = new MutationObserver((...a) => { - console.log("mutation", a); + // console.log("mutation", a); this.$nextTick(() => { this.updateWidth(true); });