diff options
author | Phil Hughes <me@iamphill.com> | 2017-07-31 13:23:19 +0300 |
---|---|---|
committer | Phil Hughes <me@iamphill.com> | 2017-08-03 19:03:49 +0300 |
commit | b8770ba98bf5e077a81b8f543a045580088a548e (patch) | |
tree | 298a8e498a3f9b4ef7dccb13831a3c9ac80aad2c /app/assets/javascripts/lib | |
parent | d86cbe69410a9a20bdeb996435a134c71ee87863 (diff) |
fixed karma failure
Diffstat (limited to 'app/assets/javascripts/lib')
-rw-r--r-- | app/assets/javascripts/lib/utils/sticky.js | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/app/assets/javascripts/lib/utils/sticky.js b/app/assets/javascripts/lib/utils/sticky.js index b5fde040a17..43a808b6ab3 100644 --- a/app/assets/javascripts/lib/utils/sticky.js +++ b/app/assets/javascripts/lib/utils/sticky.js @@ -9,6 +9,8 @@ export const isSticky = (el, scrollY, stickyTop) => { }; export default (el) => { + if (!el) return; + const computedStyle = window.getComputedStyle(el); if (!/sticky/.test(computedStyle.position)) return; |