From 329519a8566dd2e2bab4d468362df4af1f86c2ae Mon Sep 17 00:00:00 2001 From: Jared White Date: Mon, 15 Apr 2024 20:01:28 -0700 Subject: [PATCH] Fix slot duplicating issue --- bridgetown-core/lib/bridgetown-core/resource/base.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bridgetown-core/lib/bridgetown-core/resource/base.rb b/bridgetown-core/lib/bridgetown-core/resource/base.rb index 36e785fb3..2dfcbef06 100644 --- a/bridgetown-core/lib/bridgetown-core/resource/base.rb +++ b/bridgetown-core/lib/bridgetown-core/resource/base.rb @@ -117,7 +117,6 @@ def data=(new_data) Signalize.batch do @content_signal.value += 1 @data.value = @data.value.merge(new_data) - slots.clear end @data.peek end @@ -355,6 +354,7 @@ def unmark_for_fast_refresh! def prepare_for_fast_refresh! # rubocop:todo Metrics dispose_of_transform_effect FileUtils.rm(destination.output_path, force: true) if requires_destination? + slots.clear past_values = @data.peek.select do |key| key == "categories" || key == "tags" || site.taxonomy_types.keys.any?(key) end