Skip to content

Commit f180d02

Browse files
committed
chore: fix SSR issues
1 parent 5a9de0e commit f180d02

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

elements/pf-search-input/pf-search-input.ts

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -208,11 +208,13 @@ export class PfSearchInput extends LitElement {
208208
});
209209

210210
static {
211-
document.addEventListener('click', event => {
212-
for (const instance of PfSearchInput.instances) {
213-
instance._onOutsideClick(event);
214-
}
215-
});
211+
if (!isServer) {
212+
document.addEventListener('click', event => {
213+
for (const instance of PfSearchInput.instances) {
214+
instance._onOutsideClick(event);
215+
}
216+
});
217+
}
216218
}
217219

218220
connectedCallback(): void {

0 commit comments

Comments
 (0)