fix(tracker-assist):5.0.1:check presense of window before using it at the top level

This commit is contained in:
Alex Kaminskii 2023-03-03 17:03:06 +01:00
parent 270b150f88
commit d821235155
2 changed files with 2 additions and 2 deletions

View file

@ -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",

View file

@ -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
}