Permalink
Browse files

handle the case of no entries

  • Loading branch information...
tcurdt committed Apr 11, 2011
1 parent ce4774c commit 2f566659f58cef8041098c890e5ea35dcea8a6bb
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/awestruct/extensions/atomizer.rb
@@ -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 )

0 comments on commit 2f56665

Please sign in to comment.