Fix required selector argument to Component.$() (#2844)

This commit is contained in:
David Wheatley 2021-05-09 22:22:22 +01:00 committed by GitHub
parent 2cd1c2964a
commit 707889abc8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -81,7 +81,7 @@ export default abstract class Component<T extends ComponentAttrs = ComponentAttr
* @returns the jQuery object for the DOM node
* @final
*/
protected $(selector: string): JQuery {
protected $(selector?: string): JQuery {
const $element = $(this.element) as JQuery<HTMLElement>;
return selector ? $element.find(selector) : $element;