Skip to content

Commit

Permalink
Fix code scanning alert issue #1351 & #1352
Browse files Browse the repository at this point in the history
  • Loading branch information
JisanAR03 authored and DonnieBLT committed Nov 2, 2023
1 parent 4b1747a commit f70f4b1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions website/static/js/jquery.caret.js
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,8 @@
offset = this.getOldIEOffset();
}
if (offset) {
offset.top += $(oWindow).scrollTop();
offset.left += $(oWindow).scrollLeft();
if (oWindow && typeof oWindow === 'object' && 'scrollTo' in oWindow && 'document' in oWindow) {offset.top += $(oWindow).scrollTop();offset.left += $(oWindow).scrollLeft();}
else {console.error('oWindow is not a valid window object.');}
}
return offset;
};
Expand Down

0 comments on commit f70f4b1

Please sign in to comment.