Skip to content

Commit

Permalink
Remove console.log and add comment to Proxy
Browse files Browse the repository at this point in the history
  • Loading branch information
Philzen committed Dec 18, 2024
1 parent 14a59e9 commit f75f4c4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/room/Room.ts
Original file line number Diff line number Diff line change
Expand Up @@ -235,9 +235,11 @@ class Room extends (EventEmitter as new () => TypedEmitter<RoomEventCallbacks>)
this.setupE2EE();
}

/**
* Proxy for interception of changes to InternalRoomOptions after Room has been instantiated.
*/
this.options = new Proxy(this.options, {
set: (target: InternalRoomOptions, key: keyof InternalRoomOptions, value) => {
console.log("Proxy is intercepting!", key, value)
if (key == 'disconnectOnPageLeave' && value !== target[key]) {
value === true ? this.registerUnloadEvents() : this.unregisterUnloadEvents()

Check failure on line 244 in src/room/Room.ts

View workflow job for this annotation

GitHub Actions / test

Expected an assignment or function call and instead saw an expression
}
Expand Down

0 comments on commit f75f4c4

Please sign in to comment.