Return the zeroed-out bounding box instead of passing it on.
authorjeresig <jeresig@gmail.com>
Sun, 10 Oct 2010 22:54:30 +0000 (18:54 -0400)
committerjeresig <jeresig@gmail.com>
Sun, 10 Oct 2010 22:54:30 +0000 (18:54 -0400)
src/offset.js

index 7f654d8..bbb19c2 100644 (file)
@@ -25,7 +25,7 @@ if ( "getBoundingClientRect" in document.documentElement ) {
                        box = elem.getBoundingClientRect();
 
                } catch(e) {
-                       box = { top: 0, left: 0 };
+                       return { top: 0, left: 0 };
                }
 
                var doc = elem.ownerDocument,