Use is_empty

pull/5139/head^2
Christopher Mardell 5 years ago
parent b8de8fda19
commit e7b902599c

@ -181,14 +181,14 @@ if (typeof HTMLElement === 'function') {
connectedCallback() { connectedCallback() {
if (!this.$$) { if (!this.$$) {
// wasn't set up from constructor as options were not ready // wasn't set up from constructor as options were not ready
const options = Object.keys(this.$$initialProps).length ? const options = is_empty(this.$$initialProps) ?
null:
{ {
props: this.$$initialProps props: this.$$initialProps
} : };
null;
this.$$setup(options); this.$$setup(options);
// clean up // clean up, prevent reuse of $$initialProps
this.$$initialProps = null; this.$$initialProps = null;
} }
// @ts-ignore todo: improve typings // @ts-ignore todo: improve typings

Loading…
Cancel
Save