Skip to content

Commit

Permalink
Use square brackets for receiver app on window
Browse files Browse the repository at this point in the history
The receiver app is attached to the window so it can be debugged.
This should use square brackets, since "receiver" is not defined on
"window".

Issue #2528

Change-Id: I8e725bb8292cdcb88ffccd3bc65d6d54181affa6
  • Loading branch information
joeyparrish committed Apr 29, 2020
1 parent 0e613e7 commit f2f4338
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions demo/cast_receiver/receiver_app.js
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,10 @@ class ShakaReceiverApp {
ShakaReceiverApp.IDLE_TIMEOUT_MINUTES_ = 5;

document.addEventListener('shaka-ui-loaded', () => {
// Initialize the receiver app by instantiating ShakaReceiverApp.
window.receiver = new ShakaReceiverApp();
window.receiver.init();
// Instantiate ShakaReceiverApp.
const receiver = new ShakaReceiverApp();
// Attach it to window so that it can be seen in a debugger.
window['receiver'] = receiver;
// Initialize the app.
receiver.init();
});

0 comments on commit f2f4338

Please sign in to comment.