instructure / canvas-lms

The open LMS by Instructure, Inc.
https://github.com/instructure/canvas-lms/wiki
GNU Affero General Public License v3.0
5.58k stars 2.48k forks source link

Invalid Javascript in line 60 of app/views/shared/_embedded_chat.html.erb #2131

Open Loccy opened 1 year ago

Loccy commented 1 year ago

Summary:

There is syntactically invalid Javascript in app/views/shared/_embedded_chat.html.erb - this seems to have been introduced in commit 7e77548. This is causing some of our own code on our institutional VLE that taps into this (to resize some of our own iframes) to fail. Specifically:

} catch () {
  // fail gracefully
}

Steps to reproduce:

  1. errrrm, go to https://github.com/instructure/canvas-lms/blob/master/app/views/shared/_embedded_chat.html.erb
  2. Look at line 60
  3. Raise eyebrows

Expected behavior:

Not to have to raise eyebrows when I look at the code :)

Actual behavior:

Eyebrows are indeed raised :)

Additional notes:

All joking aside, you just need to put "e" between those brackets i.e. "catch(e)". It seems hardly worth a pull request (but I'll fork and fix, and do a pull request, if you prefer).

jakeoeding commented 1 year ago

@Loccy Looks like this was corrected this morning: https://github.com/instructure/canvas-lms/commit/4b37c2ce1bf4fb885db0e8e8646143a9d2d761d7