mirror of
https://github.com/navidrome/navidrome.git
synced 2026-11-27 20:39:53 +01:00
Remove dependency on lodash.get
This commit is contained in:
parent
978933aa48
commit
4699902369
6 changed files with 5 additions and 15 deletions
|
|
@ -1,5 +1,4 @@
|
|||
import React, { memo } from 'react'
|
||||
import get from 'lodash.get'
|
||||
import Typography from '@material-ui/core/Typography'
|
||||
import sanitizeFieldRestProps from './sanitizeFieldRestProps'
|
||||
import md5 from 'md5-hex'
|
||||
|
|
@ -15,7 +14,7 @@ export const MultiLineTextField = memo(
|
|||
addLabel,
|
||||
...rest
|
||||
}) => {
|
||||
const value = get(record, source)
|
||||
const value = record && record[source]
|
||||
let lines = value ? value.split('\n') : []
|
||||
if (maxLines || firstLine) {
|
||||
lines = lines.slice(firstLine, maxLines)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue