mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-10 23:07:47 +00:00
Add guard for selector overflow (only seen in phantom, not selenium/firefox or dev server/chrome)
This commit is contained in:
@@ -38,7 +38,8 @@ Darkswarm.directive 'singleLineSelectors', ($timeout, $filter) ->
|
||||
|
||||
loadWidths = ->
|
||||
$(element).find("li").not(".more").each (i) ->
|
||||
scope.allSelectors[i].width = $(this).outerWidth(true)
|
||||
if i < scope.allSelectors.length
|
||||
scope.allSelectors[i].width = $(this).outerWidth(true)
|
||||
return null # So we don't exit the loop weirdly
|
||||
|
||||
scope.overFlowSelectors = ->
|
||||
|
||||
Reference in New Issue
Block a user