Skip to content

Commit

Permalink
updates
Browse files Browse the repository at this point in the history
  • Loading branch information
jfitisoff committed Sep 19, 2016
1 parent a04d5d7 commit 2ebbc63
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
8 changes: 6 additions & 2 deletions lib/site-object/page.rb
Expand Up @@ -436,8 +436,12 @@ def on_page?
url = url.split(/\?/)[0]
end

if @url_matcher && @url_matcher =~ url
return true
if @url_matcher
if @url_matcher =~ url
return true
else
return false
end
elsif @url_template.match(url)
if @arguments.empty?
return true
Expand Down
4 changes: 3 additions & 1 deletion lib/site-object/site.rb
Expand Up @@ -213,7 +213,9 @@ def page
@pages.each do |p|
if p.url_matcher && p.url_matcher =~ url
found_page = p
elsif p.url_template.match url.split(/(\?|#)/)[0]
elsif p.query_arguments && p.url_template.match(url)
found_page = p
elsif !p.query_arguments && p.url_template.match(url.split(/(\?|#)/)[0])
found_page = p
end

Expand Down
2 changes: 1 addition & 1 deletion lib/site-object/version.rb
@@ -1,3 +1,3 @@
module SiteObject
VERSION = '0.4.7'
VERSION = '0.4.8'
end

0 comments on commit 2ebbc63

Please sign in to comment.