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 clock if authentication is enabled #4860

Closed
wants to merge 10 commits into from
Prev Previous commit
Next Next commit
Formatting
  • Loading branch information
GermanBluefox committed Aug 6, 2019
commit 3a52cacadc49fe4026b14ecd7799073c012ddf25
2 changes: 1 addition & 1 deletion lib/client/clock-client.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ client.render = function render (xhr) {
// Generate and insert the clock.
let timeDivisor = parseInt(client.settings.timeFormat ? client.settings.timeFormat : 12, 10);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Just number validation.

let today = new Date()
, h = today.getHours() % timeDivisor;
, h = today.getHours() % timeDivisor;
if (timeDivisor === 12) {
h = h || 12; // In the case of 00:xx, change to 12:xx for 12h time
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Formatting

Copy link
Contributor

Choose a reason for hiding this comment

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

This is not only formatting. For h == 4 this will be changed to h==12. Please restore old behaviour, perhaps with === instead of ==

Copy link
Contributor

Choose a reason for hiding this comment

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

fixed on my branch

}
Expand Down