Skip to content

Commit

Permalink
handle the case of no entries
Browse files Browse the repository at this point in the history
  • Loading branch information
tcurdt committed Apr 11, 2011
1 parent ce4774c commit 2f56665
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/awestruct/extensions/atomizer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ def initialize(entries_name, output_path, opts={})
end

def execute(site)
entries = site.send( @entries_name )
entries = site.send( @entries_name ) || []
unless ( @num_entries == :all )
entries = entries[0,@num_entries]
entries = entries[0, @num_entries]
end
input_page = File.join( File.dirname(__FILE__), 'template.atom.haml' )
page = site.engine.load_page( input_page )
Expand Down

0 comments on commit 2f56665

Please sign in to comment.