Skip to content

Commit ca3cc0f

Browse files
committed
avoid document reference error in some versions of Node
1 parent 30d01d2 commit ca3cc0f

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

src/client/client.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -278,9 +278,10 @@ class _ClientImpl {
278278
if (
279279
debugImpl !== null &&
280280
this.debug !== false &&
281-
this._debugPanel == null
281+
this._debugPanel == null &&
282+
typeof document !== 'undefined'
282283
) {
283-
let target = document && document.body;
284+
let target = document.body;
284285
if (this.debug && this.debug.target !== undefined) {
285286
target = this.debug.target;
286287
}

0 commit comments

Comments
 (0)