Skip to content

Commit 24e5b8b

Browse files
mwczcastastrophegithub-actions[bot]
authored
chore: remove unreachable array case from hasSlot (#1666)
* remove dormant array case from hasSlot * Update elements/pfelement/src/pfelement.js Revert warning messaging * Update elements/pfelement/src/pfelement.js Update docs Co-authored-by: [ Cassondra ] <[email protected]> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
1 parent b717636 commit 24e5b8b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

elements/pfelement/src/pfelement.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,6 +240,7 @@ class PFElement extends HTMLElement {
240240
/**
241241
* Returns a boolean statement of whether or not that slot exists in the light DOM.
242242
*
243+
* @param {String|Array} name The slot name.
243244
* @example this.hasSlot("header");
244245
*/
245246
hasSlot(name) {
@@ -261,7 +262,7 @@ class PFElement extends HTMLElement {
261262
);
262263
} else {
263264
this.warn(
264-
`Did not recognize the type of the name provided to hasSlot; this function can accept a string or an array.`
265+
`Expected hasSlot argument to be a string or an array, but it was given: ${typeof name}.`
265266
);
266267
return;
267268
}

0 commit comments

Comments
 (0)