lib/locomotive/plugin/liquid.rb in locomotive_plugins-1.0.0.beta9 vs lib/locomotive/plugin/liquid.rb in locomotive_plugins-1.0.0.beta10

- old
+ new

@@ -127,13 +127,16 @@ (context.registers[:enabled_plugin_tags] ||= Set.new).tap do |set| set.merge(self.class.prefixed_liquid_tags(plugin_id).values) end # Add drop with extension + context['plugins'] ||= {} drop = self.to_liquid - drop.extend(Locomotive::Plugin::Liquid::DropExtension) - drop.set_plugin_id(plugin_id) - (context['plugins'] ||= {})[plugin_id] = drop + if drop + drop.extend(Locomotive::Plugin::Liquid::DropExtension) + drop.set_plugin_id(plugin_id) + context['plugins'][plugin_id] = drop + end # Add filters context.add_filters(self.class.prefixed_liquid_filter_module(plugin_id)) end