jekyll_alias_generator icon indicating copy to clipboard operation
jekyll_alias_generator copied to clipboard

Fixed NoMethodError #size

Open joelmeyerhamme opened this issue 9 years ago • 2 comments

alias_sections.size fails when it is nil, which happens when the alias is in the root dir (alias: /somepage.html) because Array access returns nil if the start is more than one item of the end (http://stackoverflow.com/questions/3947002/how-does-ruby-handle-array-range-accessing). #drop does not have this irregularity (https://github.com/thoughtbot/til/blob/master/ruby/all-but-the-first-element-from-array.md).

joelmeyerhamme avatar Sep 05 '15 20:09 joelmeyerhamme

+1 for merging into master.

Thanks @joelmeyerhamme your fix works like a charm! Tarin

taringamberini avatar Oct 10 '15 15:10 taringamberini

+1

Works as expected. Good job @joelmeyerhamme

egladman avatar Nov 09 '15 22:11 egladman