Fix "Something went wrong" error when deleting a playlist

This commit is contained in:
Deluan 2020-11-05 14:06:21 -05:00
parent 0b977df8dd
commit 873cea4046
2 changed files with 2 additions and 2 deletions

View File

@ -12,7 +12,7 @@ export const isReadOnly = (owner) => {
}
const Writable = (props) => {
const { record, children } = props
const { record = {}, children } = props
if (isWritable(record.owner)) {
return Children.map(children, (child) =>
isValidElement(child) ? cloneElement(child, props) : child

View File

@ -20,7 +20,7 @@ const PlaylistFilter = (props) => (
</Filter>
)
const TogglePublicInput = ({ permissions, resource, record, source }) => {
const TogglePublicInput = ({ permissions, resource, record = {}, source }) => {
const notify = useNotify()
const [togglePublic] = useUpdate(
resource,