Skip to content

Commit

Permalink
Quote property access in CastProxy
Browse files Browse the repository at this point in the history
When CastProxy refers to a proxy object, the type is necessarily
merely "Object".  This isn't specific enough for the compiler to check
access to this.videoProxy_.paused, so we convert this to use square
brackets.

Issue shaka-project#2528

Change-Id: Ic51fa9fdd20b8ac494fea1e844a945fba319f3c8
  • Loading branch information
joeyparrish committed Apr 28, 2020
1 parent e348630 commit ea3ff2b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/cast/cast_proxy.js
Original file line number Diff line number Diff line change
Expand Up @@ -449,7 +449,7 @@ shaka.cast.CastProxy = class extends shaka.util.FakeEventTarget {
* @private
*/
onFirstCastStateUpdate_() {
const type = this.videoProxy_.paused ? 'pause' : 'play';
const type = this.videoProxy_['paused'] ? 'pause' : 'play';
const fakeEvent = new shaka.util.FakeEvent(type);
this.videoEventTarget_.dispatchEvent(fakeEvent);
}
Expand Down

0 comments on commit ea3ff2b

Please sign in to comment.