mirror of
https://github.com/navidrome/navidrome.git
synced 2025-06-08 11:22:26 +03:00
Fix "Something went wrong" error when deleting a playlist
This commit is contained in:
parent
0b977df8dd
commit
873cea4046
@ -12,7 +12,7 @@ export const isReadOnly = (owner) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const Writable = (props) => {
|
const Writable = (props) => {
|
||||||
const { record, children } = props
|
const { record = {}, children } = props
|
||||||
if (isWritable(record.owner)) {
|
if (isWritable(record.owner)) {
|
||||||
return Children.map(children, (child) =>
|
return Children.map(children, (child) =>
|
||||||
isValidElement(child) ? cloneElement(child, props) : child
|
isValidElement(child) ? cloneElement(child, props) : child
|
||||||
|
@ -20,7 +20,7 @@ const PlaylistFilter = (props) => (
|
|||||||
</Filter>
|
</Filter>
|
||||||
)
|
)
|
||||||
|
|
||||||
const TogglePublicInput = ({ permissions, resource, record, source }) => {
|
const TogglePublicInput = ({ permissions, resource, record = {}, source }) => {
|
||||||
const notify = useNotify()
|
const notify = useNotify()
|
||||||
const [togglePublic] = useUpdate(
|
const [togglePublic] = useUpdate(
|
||||||
resource,
|
resource,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user