Skip to content

Commit

Permalink
remove nil objects from links
Browse files Browse the repository at this point in the history
  • Loading branch information
plukevdh committed Jun 11, 2011
1 parent e4d908f commit d28fd3e
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/bookit/content/link.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ class Link < Generic

def initialize(url, objects, options={})
@url = url
objects.compact!
@objects = (objects.class == Array) ? objects : [objects]

super options
Expand Down

0 comments on commit d28fd3e

Please sign in to comment.