Skip to content

Commit d1062e5

Browse files
committed
Fix browser detection not detecting browser envs entirely correctly
Fixes #1828
1 parent bd11ad1 commit d1062e5

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/index.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2815,7 +2815,11 @@ function _flatpickr(
28152815
}
28162816

28172817
/* istanbul ignore next */
2818-
if (typeof HTMLElement !== "undefined") {
2818+
if (
2819+
typeof HTMLElement !== "undefined" &&
2820+
typeof HTMLCollection !== "undefined" &&
2821+
typeof NodeList !== "undefined"
2822+
) {
28192823
// browser env
28202824
HTMLCollection.prototype.flatpickr = NodeList.prototype.flatpickr = function(
28212825
config?: Options

0 commit comments

Comments
 (0)