Browse Source

Update the version number.

Naotoshi Fujita 2 years ago
parent
commit
efa458db47

+ 6 - 2
dist/js/splide.cjs.js

@@ -1,6 +1,6 @@
 /*!
  * Splide.js
- * Version  : 4.1.2
+ * Version  : 4.1.3
  * License  : MIT
  * Copyright: 2022 Naotoshi Fujita
  */
@@ -69,7 +69,11 @@ function isNull(subject) {
 }
 
 function isHTMLElement(subject) {
-  return subject instanceof HTMLElement;
+  try {
+    return subject instanceof (subject.ownerDocument.defaultView || window).HTMLElement;
+  } catch (e) {
+    return false;
+  }
 }
 
 function toArray(value) {

+ 6 - 2
dist/js/splide.esm.js

@@ -4,7 +4,7 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
 
 /*!
  * Splide.js
- * Version  : 4.1.2
+ * Version  : 4.1.3
  * License  : MIT
  * Copyright: 2022 Naotoshi Fujita
  */
@@ -64,7 +64,11 @@ function isNull(subject) {
 }
 
 function isHTMLElement(subject) {
-  return subject instanceof HTMLElement;
+  try {
+    return subject instanceof (subject.ownerDocument.defaultView || window).HTMLElement;
+  } catch (e) {
+    return false;
+  }
 }
 
 function toArray(value) {

BIN
dist/js/splide.min.js.gz


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

@@ -41,10 +41,11 @@ function isNull(subject) {
   return subject === null;
 }
 function isHTMLElement(subject) {
-  return subject instanceof HTMLElement;
-}
-function isHTMLButtonElement(subject) {
-  return subject instanceof HTMLButtonElement;
+  try {
+    return subject instanceof (subject.ownerDocument.defaultView || window).HTMLElement;
+  } catch (e) {
+    return false;
+  }
 }
 
 function toArray(value) {
@@ -335,7 +336,6 @@ exports.hasClass = hasClass;
 exports.includes = includes;
 exports.isArray = isArray;
 exports.isFunction = isFunction;
-exports.isHTMLButtonElement = isHTMLButtonElement;
 exports.isHTMLElement = isHTMLElement;
 exports.isNull = isNull;
 exports.isObject = isObject;

+ 6 - 5
dist/js/utils/splide-utils.esm.js

@@ -37,10 +37,11 @@ function isNull(subject) {
   return subject === null;
 }
 function isHTMLElement(subject) {
-  return subject instanceof HTMLElement;
-}
-function isHTMLButtonElement(subject) {
-  return subject instanceof HTMLButtonElement;
+  try {
+    return subject instanceof (subject.ownerDocument.defaultView || window).HTMLElement;
+  } catch (e) {
+    return false;
+  }
 }
 
 function toArray(value) {
@@ -302,4 +303,4 @@ function uniqueId(prefix) {
   return `${prefix}${pad(ids[prefix] = (ids[prefix] || 0) + 1)}`;
 }
 
-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 };
+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 };

+ 2 - 2
package-lock.json

@@ -1,12 +1,12 @@
 {
   "name": "@splidejs/splide",
-  "version": "4.1.2",
+  "version": "4.1.3",
   "lockfileVersion": 2,
   "requires": true,
   "packages": {
     "": {
       "name": "@splidejs/splide",
-      "version": "4.1.2",
+      "version": "4.1.3",
       "license": "MIT",
       "devDependencies": {
         "@babel/core": "^7.18.13",

+ 1 - 1
package.json

@@ -1,6 +1,6 @@
 {
   "name": "@splidejs/splide",
-  "version": "4.1.2",
+  "version": "4.1.3",
   "description": "Splide is a lightweight, flexible and accessible slider/carousel. No dependencies, no Lighthouse errors.",
   "author": "Naotoshi Fujita",
   "license": "MIT",