From 12b2ab133a8a55c1fa90dab2ae6f63de8d49509d Mon Sep 17 00:00:00 2001 From: Lea Verou Date: Sun, 16 Mar 2025 17:25:22 -0400 Subject: [PATCH] Prevent bug where edges where auto-added --- docs/docs/palettes/app/vue-components/color-slider.js | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/docs/docs/palettes/app/vue-components/color-slider.js b/docs/docs/palettes/app/vue-components/color-slider.js index 4d21d85a8..cdaa10624 100644 --- a/docs/docs/palettes/app/vue-components/color-slider.js +++ b/docs/docs/palettes/app/vue-components/color-slider.js @@ -223,8 +223,15 @@ export default { }, }, watch: { - colorCurrentString() { - this.$emit('update:color', this.colorCurrent); + async colorCurrentString() { + if (!this.colorComponent) { + // If we're monitoring a specific color component, we can key off changes to that value + await this.$nextTick(); + if (this.color + '' !== this.colorCurrentString) { + // Still different + this.$emit('update:color', this.colorCurrent); + } + } }, async colorComponentValue() {