Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: compatibility with old browsers #4544

Merged
merged 2 commits into from Aug 29, 2022
Merged

Conversation

snitin315
Copy link
Member

@snitin315 snitin315 commented Aug 20, 2022

  • This is a bugfix
  • This is a feature
  • This is a code refactor
  • This is a test update
  • This is a docs update
  • This is a metadata update

For Bugs and Features; did you add new tests?

Already present.

Motivation / Use-Case

Fix #4543

Object.keys is compatible with IE9,10, and 11 - https://caniuse.com/?search=object.keys

Breaking Changes

No

Additional Info

No

@codecov
Copy link

codecov bot commented Aug 20, 2022

Codecov Report

Merging #4544 (24e25cc) into master (735864c) will decrease coverage by 0.17%.
The diff coverage is 0.00%.

@@            Coverage Diff             @@
##           master    #4544      +/-   ##
==========================================
- Coverage   92.24%   92.06%   -0.18%     
==========================================
  Files          16       16              
  Lines        1637     1638       +1     
  Branches      616      616              
==========================================
- Hits         1510     1508       -2     
- Misses        116      119       +3     
  Partials       11       11              
Impacted Files Coverage Δ
client-src/utils/log.js 43.75% <0.00%> (-2.92%) ⬇️
lib/servers/WebsocketServer.js 89.74% <0.00%> (-5.13%) ⬇️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@@ -27,8 +27,8 @@ const logEnabledFeatures = (features) => {
let logString = "Server started:";

// Server started: Hot Module Replacement enabled, Live Reloading enabled, Overlay disabled.
for (const [key, value] of Object.entries(features)) {
logString += ` ${key} ${value ? "enabled" : "disabled"},`;
for (const key of Object.keys(features)) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Still new syntax https://caniuse.com/mdn-javascript_statements_for_of, let rewrite on simple loop

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, this will be converted to for loop by babel:

Screenshot 2022-08-27 at 6 51 03 AM

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed.

@alexander-akait alexander-akait merged commit 6a430d4 into master Aug 29, 2022
@alexander-akait alexander-akait deleted the fix/old-browser branch August 29, 2022 12:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Version 4.10.0 breaks compatibility with older browsers that do not have Object.entries
2 participants