SimplQ / simplQ-frontend

Modern and fully web based free queue management open source software.
https://simplq.me
GNU General Public License v3.0
175 stars 135 forks source link

Fix crash: ReferenceError: Intl is not defined #673

Closed daltonfury42 closed 2 years ago

daltonfury42 commented 2 years ago

This line at times crashes with stacktrace:

ReferenceError: Intl is not defined
  at c (components/common/Footer/Footer.jsx:10:29)
  at Module.312 (index.jsx:30:10)
  at l (/j/Mars-9Oct-Saturday:1:2308)
  at Object.254 (None:2:46)
  at l (/j/Mars-9Oct-Saturday:1:2308)
...
(14 additional frame(s) were not displayed)

image

This was reported on a "MiuiBrowser", so looks like the Intl module is not present in some non-standard browsers:

To fix this, add a check to see in Intl is undefined. If so, the function dayOfWeek can return the string "day".

indremak commented 2 years ago

I would like to work on this issue, could you assign it to me?

daltonfury42 commented 2 years ago

Sure, go ahead. We don’t usually assign issues, but the first complete PR will be accepted.

On Sat, 9 Oct 2021 at 10:57 PM, Indre @.***> wrote:

I would like to work on this issue, could you assign it to me?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/SimplQ/simplQ-frontend/issues/673#issuecomment-939331667, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACV4EOFOO7W4IC5OQOBEBX3UGB3PHANCNFSM5FVOITQA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.