Skip to content

Commit 50523b8

Browse files
authored
"===" and "!==" should be used instead of "==" and "!=" (usds#200)
1 parent 3be9f74 commit 50523b8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

‎assets/js/site.js‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ $(function(){
77
// change nav bar visibility on scroll
88
function onScroll() {
99
var isNavBarVisible = window.pageYOffset >= showNavBarMinimum;
10-
if ( isNavBarVisible != wasNavBarVisible ) {
10+
if ( isNavBarVisible !== wasNavBarVisible ) {
1111
$navBar.toggleClass('show');
1212
wasNavBarVisible = isNavBarVisible;
1313
}
@@ -36,7 +36,7 @@ $(function(){
3636

3737
// Scroll Animations
3838
$('a[href*=#]:not([href=#])').click(function() {
39-
if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') && location.hostname == this.hostname) {
39+
if (location.pathname.replace(/^\//,'') === this.pathname.replace(/^\//,'') && location.hostname === this.hostname) {
4040
var target = $(this.hash);
4141
target = target.length ? target : $('[name=' + this.hash.slice(1) +']');
4242
if (target.length) {

0 commit comments

Comments
 (0)