]> git.openstreetmap.org Git - rails.git/commitdiff
Set max queuePos high to ensure a banner is shown
authorBryan Housel <bryan@mapbox.com>
Tue, 21 Jun 2016 10:45:22 +0000 (06:45 -0400)
committerBryan Housel <bryan@mapbox.com>
Tue, 21 Jun 2016 10:45:22 +0000 (06:45 -0400)
Previously it was possible for no banners to fall below max queuePos,
in the situation where several banners get removed from active rotation.

app/views/layouts/_banner.html.erb

index 94abb5c1faae3c017dd82be5c003ecc909ab2632..a1091c887acdc0c0971756ec122ffa29d668e93b 100644 (file)
@@ -13,7 +13,7 @@
 
 bannerSym = nil
 cookieStr = nil
-queuePos = active_banners.length
+queuePos = 9999
 
 # pick least recently seen banner that is not hidden
 active_banners.each_key do |k|