mirror of
https://github.com/Dvorinka/swingmusic-extended.git
synced 2026-10-29 06:11:16 +00:00
use ternary op to send copyright text to songlist component
+ return a zeros if seconds is undefined in formatSeconds()
This commit is contained in:
1 parent
5f14fbf86d
commit
13f38c5a66
5 files changed
+9
-11
No files matched your search
@@ -55,6 +55,10 @@ function isSameRoute(to: r, from: r) {
|
||||
* @param long Whether to provide the time in the long format
|
||||
*/
|
||||
function formatSeconds(seconds: number, long?: boolean) {
|
||||
if (seconds == undefined) {
|
||||
return "00:00";
|
||||
}
|
||||
|
||||
const date = new Date(seconds * 1000);
|
||||
|
||||
const hh = date.getUTCHours();
|
||||
|
||||
Reference in new issue
Block a user