From d8212351552f3547bbd894feedd5050f163c582b Mon Sep 17 00:00:00 2001 From: Alex Kaminskii Date: Fri, 3 Mar 2023 17:03:06 +0100 Subject: [PATCH] fix(tracker-assist):5.0.1:check presense of window before using it at the top level --- tracker/tracker-assist/package.json | 2 +- tracker/tracker-assist/src/RemoteControl.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tracker/tracker-assist/package.json b/tracker/tracker-assist/package.json index aaa80429d..4277e2e36 100644 --- a/tracker/tracker-assist/package.json +++ b/tracker/tracker-assist/package.json @@ -1,7 +1,7 @@ { "name": "@openreplay/tracker-assist", "description": "Tracker plugin for screen assistance through the WebRTC", - "version": "5.0.0", + "version": "5.0.1", "keywords": [ "WebRTC", "assistance", diff --git a/tracker/tracker-assist/src/RemoteControl.ts b/tracker/tracker-assist/src/RemoteControl.ts index fb9850437..017918238 100644 --- a/tracker/tracker-assist/src/RemoteControl.ts +++ b/tracker/tracker-assist/src/RemoteControl.ts @@ -11,7 +11,7 @@ export enum RCStatus { let setInputValue = function(this: HTMLInputElement | HTMLTextAreaElement, value: string) { this.value = value } -const nativeInputValueDescriptor = Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype, 'value') +const nativeInputValueDescriptor = typeof window !== 'undefined' && Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype, 'value') if (nativeInputValueDescriptor && nativeInputValueDescriptor.set) { setInputValue = nativeInputValueDescriptor.set }