From ff560618536578c87bce464ea03b0d7dc70bd371 Mon Sep 17 00:00:00 2001 From: Gary Katsevman Date: Tue, 30 Apr 2013 19:18:21 -0400 Subject: [PATCH] Make sure to return an object if box doesn't exist --- src/js/lib.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/js/lib.js b/src/js/lib.js index ef6436330..3462fb0b3 100644 --- a/src/js/lib.js +++ b/src/js/lib.js @@ -593,7 +593,12 @@ vjs.findPosition = function(el) { box = el.getBoundingClientRect(); - if (!box) { return 0; } + if (!box) { + return { + left: 0, + top: 0 + }; + } docEl = document.documentElement; body = document.body;