diff options
| author | mrmr1993 | 2014-12-22 12:39:47 +0000 |
|---|---|---|
| committer | mrmr1993 | 2014-12-22 12:41:53 +0000 |
| commit | 278820f544d201b975a73ebe82d4a67792b967df (patch) | |
| tree | 78add12a14cfe5aac34365fb5e71c8a1c231975c | |
| parent | c1ffbc88ed1e340a7a046e1d75499642bf220e7f (diff) | |
| download | vimium-278820f544d201b975a73ebe82d4a67792b967df.tar.bz2 | |
Use a splat instead of apply
| -rw-r--r-- | content_scripts/link_hints.coffee | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/content_scripts/link_hints.coffee b/content_scripts/link_hints.coffee index df442ea6..3a9e2027 100644 --- a/content_scripts/link_hints.coffee +++ b/content_scripts/link_hints.coffee @@ -215,7 +215,8 @@ LinkHints = while visibleElement = visibleElements.pop() rects = [visibleElement.rect] for {rect: negativeRect} in visibleElements - rects = Array::concat.apply [], (rects.map (rect) -> Rect.subtract rect, negativeRect) + # Subtract negativeRect from every rect in rects, and concatenate the arrays of rects that result. + rects = [].concat (rects.map (rect) -> Rect.subtract rect, negativeRect)... if rects.length > 0 nonOverlappingElements.push {element: visibleElement.element, rect: rects[0]} else |
