return empty string
This commit is contained in:
parent
a346ccadb1
commit
c716a14330
@ -1,7 +1,11 @@
|
||||
import Vue from 'vue'
|
||||
|
||||
Vue.filter('toMin', function (sec) {
|
||||
const minutes = Math.floor(sec / 60)
|
||||
const seconds = Math.round(sec - minutes * 60)
|
||||
return `${String(minutes).padStart(2, '0')}:${String(seconds).padStart(2, '0')} min`
|
||||
if (sec) {
|
||||
const minutes = Math.floor(sec / 60)
|
||||
const seconds = Math.round(sec - minutes * 60)
|
||||
return `${String(minutes).padStart(2, '0')}:${String(seconds).padStart(2, '0')} min`
|
||||
} else {
|
||||
return ''
|
||||
}
|
||||
})
|
||||
|
Loading…
x
Reference in New Issue
Block a user