mirror of
https://github.com/navidrome/navidrome.git
synced 2025-04-16 12:10:36 +03:00
Add a try catch to display the record when DurationField fails
This commit is contained in:
parent
e871c7daee
commit
069de0f9ea
@ -2,7 +2,12 @@ import React from 'react'
|
||||
import PropTypes from 'prop-types'
|
||||
|
||||
const DurationField = ({ record = {}, source }) => {
|
||||
return <span>{format(record[source])}</span>
|
||||
try {
|
||||
return <span>{format(record[source])}</span>
|
||||
} catch (e) {
|
||||
console.log('Error in DurationField !!! record=', record)
|
||||
throw e
|
||||
}
|
||||
}
|
||||
|
||||
const format = (d) => {
|
||||
|
Loading…
x
Reference in New Issue
Block a user