Skip to content

Commit

Permalink
fix: dom.getBoundingClientRect check that el is defined
Browse files Browse the repository at this point in the history
  • Loading branch information
brandonocasey committed Feb 28, 2017
1 parent f558648 commit 41942ec
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/js/utils/dom.js
Original file line number Diff line number Diff line change
Expand Up @@ -484,7 +484,7 @@ export function unblockTextSelection() {
* Always returns a plain
*/
export function getBoundingClientRect(el) {
if (el.getBoundingClientRect && el.parentNode) {
if (el && el.getBoundingClientRect && el.parentNode) {
const rect = el.getBoundingClientRect();
const result = {};

Expand Down

0 comments on commit 41942ec

Please sign in to comment.