Skip to content

Commit 9cda24d

Browse files
author
Mahesh Kothur
committed
feat(utility): updated the document and relational operator
1 parent b79ef5a commit 9cda24d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

packages/utilities/src/utilities/smoothScroll/smoothScroll.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -17,17 +17,17 @@
1717
* You can use this for jump to target element by providing event object.
1818
* it will scroll into view of target by selecting attribute and assigning to id.
1919
*
20-
* @param {*} e event object and seletor
20+
* @param {object} { e: Event, Selector: QuerySelector for the target element }
2121
*/
2222
const smoothScroll = ({ e, selector }) => {
23-
if (e != null) {
23+
if (e !== null) {
2424
e.preventDefault();
2525
const id = e.currentTarget.getAttribute('href');
2626
document.querySelector(id).scrollIntoView({
2727
behavior: 'smooth',
2828
block: 'start',
2929
});
30-
} else if (selector != null) {
30+
} else if (selector !== null) {
3131
document.querySelector(selector).scrollIntoView({
3232
behavior: 'smooth',
3333
block: 'start',

0 commit comments

Comments
 (0)