mirror of
https://github.com/navidrome/navidrome.git
synced 2025-06-11 04:42:17 +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'
|
import PropTypes from 'prop-types'
|
||||||
|
|
||||||
const DurationField = ({ record = {}, source }) => {
|
const DurationField = ({ record = {}, source }) => {
|
||||||
|
try {
|
||||||
return <span>{format(record[source])}</span>
|
return <span>{format(record[source])}</span>
|
||||||
|
} catch (e) {
|
||||||
|
console.log('Error in DurationField !!! record=', record)
|
||||||
|
throw e
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const format = (d) => {
|
const format = (d) => {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user