lib/nanoc/base/result_data/item_rep.rb in nanoc-3.4.1 vs lib/nanoc/base/result_data/item_rep.rb in nanoc-3.4.2

- old
+ new

@@ -238,9 +238,14 @@ # any). # # @return [String] The compiled content at the given snapshot (or the # default snapshot if no snapshot is specified) def compiled_content(params={}) + # Make sure we're not binary + if self.item.binary? + raise Nanoc::Errors::CannotGetCompiledContentOfBinaryItem.new(self) + end + # Notify Nanoc::NotificationCenter.post(:visit_started, self.item) Nanoc::NotificationCenter.post(:visit_ended, self.item) # Get name of last pre-layout snapshot