We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9f52cb1 commit 6a6fd34Copy full SHA for 6a6fd34
src/josh.js
@@ -62,7 +62,7 @@ class Josh {
62
}
63
//Adding css to DOM
64
addCss(targetElm) {
65
- if (targetElm.length > 0) {
+ if (targetElm instanceof NodeList) {
66
targetElm.forEach((elm) => {
67
this.cssUtil(elm);
68
});
@@ -91,7 +91,7 @@ class Josh {
91
threshold: this.offset,
92
93
);
94
- if (domElement.length > 0) {
+ if (domElement instanceof NodeList) {
95
//Observing every element
96
domElement.forEach((animItem) => {
97
intetsectObserver.observe(animItem);
0 commit comments