-
Notifications
You must be signed in to change notification settings - Fork 71.9k
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
Changes from 1 commit
3c25914
366d10c
3a52cac
d61e8f9
050808d
ccad081
293ac55
afbe6a3
d361a72
bd42ad8
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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); | ||
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 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Formatting There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 == There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. fixed on my branch |
||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just number validation.