@vaadin/vaadin-themable-mixin
Advanced tools
Comparing version 23.1.0-alpha2 to 23.1.0-alpha3
{ | ||
"name": "@vaadin/vaadin-themable-mixin", | ||
"version": "23.1.0-alpha2", | ||
"version": "23.1.0-alpha3", | ||
"publishConfig": { | ||
@@ -41,5 +41,5 @@ "access": "public" | ||
"@vaadin/testing-helpers": "^0.3.2", | ||
"sinon": "^9.2.4" | ||
"sinon": "^13.0.2" | ||
}, | ||
"gitHead": "6842dcb8b163d4512fae8d3d12a6559077a4aee6" | ||
"gitHead": "8c9e64e8dfa158dd52a9bf6da351ff038c88ca85" | ||
} |
@@ -182,3 +182,11 @@ /** | ||
function hasThemes(tagName) { | ||
const elementClass = customElements.get(tagName); | ||
return classHasThemes(customElements.get(tagName)); | ||
} | ||
/** | ||
* Check if the custom element type has themes applied. | ||
* @param {Function} elementClass | ||
* @returns {boolean} | ||
*/ | ||
function classHasThemes(elementClass) { | ||
return elementClass && Object.prototype.hasOwnProperty.call(elementClass, '__themes'); | ||
@@ -201,3 +209,3 @@ } | ||
const template = this.prototype._template; | ||
if (!template || hasThemes(this.is)) { | ||
if (!template || classHasThemes(this)) { | ||
return; | ||
@@ -204,0 +212,0 @@ } |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
25796
380