Skip to content

Commit efa458d

Browse files
Update the version number.
1 parent fe6b65c commit efa458d

File tree

7 files changed

+26
-17
lines changed

7 files changed

+26
-17
lines changed

dist/js/splide.cjs.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*!
22
* Splide.js
3-
* Version : 4.1.2
3+
* Version : 4.1.3
44
* License : MIT
55
* Copyright: 2022 Naotoshi Fujita
66
*/
@@ -69,7 +69,11 @@ function isNull(subject) {
6969
}
7070

7171
function isHTMLElement(subject) {
72-
return subject instanceof HTMLElement;
72+
try {
73+
return subject instanceof (subject.ownerDocument.defaultView || window).HTMLElement;
74+
} catch (e) {
75+
return false;
76+
}
7377
}
7478

7579
function toArray(value) {

dist/js/splide.esm.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
44

55
/*!
66
* Splide.js
7-
* Version : 4.1.2
7+
* Version : 4.1.3
88
* License : MIT
99
* Copyright: 2022 Naotoshi Fujita
1010
*/
@@ -64,7 +64,11 @@ function isNull(subject) {
6464
}
6565

6666
function isHTMLElement(subject) {
67-
return subject instanceof HTMLElement;
67+
try {
68+
return subject instanceof (subject.ownerDocument.defaultView || window).HTMLElement;
69+
} catch (e) {
70+
return false;
71+
}
6872
}
6973

7074
function toArray(value) {

dist/js/splide.min.js.gz

29 Bytes
Binary file not shown.

dist/js/utils/splide-utils.cjs.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,11 @@ function isNull(subject) {
4141
return subject === null;
4242
}
4343
function isHTMLElement(subject) {
44-
return subject instanceof HTMLElement;
45-
}
46-
function isHTMLButtonElement(subject) {
47-
return subject instanceof HTMLButtonElement;
44+
try {
45+
return subject instanceof (subject.ownerDocument.defaultView || window).HTMLElement;
46+
} catch (e) {
47+
return false;
48+
}
4849
}
4950

5051
function toArray(value) {
@@ -335,7 +336,6 @@ exports.hasClass = hasClass;
335336
exports.includes = includes;
336337
exports.isArray = isArray;
337338
exports.isFunction = isFunction;
338-
exports.isHTMLButtonElement = isHTMLButtonElement;
339339
exports.isHTMLElement = isHTMLElement;
340340
exports.isNull = isNull;
341341
exports.isObject = isObject;

dist/js/utils/splide-utils.esm.js

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,11 @@ function isNull(subject) {
3737
return subject === null;
3838
}
3939
function isHTMLElement(subject) {
40-
return subject instanceof HTMLElement;
41-
}
42-
function isHTMLButtonElement(subject) {
43-
return subject instanceof HTMLButtonElement;
40+
try {
41+
return subject instanceof (subject.ownerDocument.defaultView || window).HTMLElement;
42+
} catch (e) {
43+
return false;
44+
}
4445
}
4546

4647
function toArray(value) {
@@ -302,4 +303,4 @@ function uniqueId(prefix) {
302303
return `${prefix}${pad(ids[prefix] = (ids[prefix] || 0) + 1)}`;
303304
}
304305

305-
export { abs, addClass, append, apply, approximatelyEqual, assert, assign, before, between, camelToKebab, ceil, child, children, clamp, create, display, empty, error, find, floor, focus, forEach, forOwn, format, getAttribute, hasClass, includes, isArray, isFunction, isHTMLButtonElement, isHTMLElement, isNull, isObject, isString, isUndefined, matches, max, measure, merge, min, nextTick, noop, omit, ownKeys, pad, parseHtml, prevent, push, query, queryAll, raf, rect, remove, removeAttribute, removeClass, setAttribute, sign, slice, style, timeOf, toArray, toggleClass, uniqueId, unit };
306+
export { abs, addClass, append, apply, approximatelyEqual, assert, assign, before, between, camelToKebab, ceil, child, children, clamp, create, display, empty, error, find, floor, focus, forEach, forOwn, format, getAttribute, hasClass, includes, isArray, isFunction, isHTMLElement, isNull, isObject, isString, isUndefined, matches, max, measure, merge, min, nextTick, noop, omit, ownKeys, pad, parseHtml, prevent, push, query, queryAll, raf, rect, remove, removeAttribute, removeClass, setAttribute, sign, slice, style, timeOf, toArray, toggleClass, uniqueId, unit };

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@splidejs/splide",
3-
"version": "4.1.2",
3+
"version": "4.1.3",
44
"description": "Splide is a lightweight, flexible and accessible slider/carousel. No dependencies, no Lighthouse errors.",
55
"author": "Naotoshi Fujita",
66
"license": "MIT",

0 commit comments

Comments
 (0)