fix(tracker-assist):5.0.1:check presense of window before using it at the top level
This commit is contained in:
parent
270b150f88
commit
d821235155
2 changed files with 2 additions and 2 deletions
|
|
@ -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",
|
||||
|
|
|
|||
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue