mirror of
https://github.com/navidrome/navidrome.git
synced 2026-05-03 06:51:16 +00:00
Don't explode when record is not loaded yet
This commit is contained in:
parent
1546d7fb15
commit
8d2b5bd259
@ -2,7 +2,7 @@ import { useCallback, useEffect, useRef, useState } from 'react'
|
|||||||
import { useDataProvider, useNotify } from 'react-admin'
|
import { useDataProvider, useNotify } from 'react-admin'
|
||||||
import subsonic from '../subsonic'
|
import subsonic from '../subsonic'
|
||||||
|
|
||||||
export const useToggleStar = (resource, record) => {
|
export const useToggleStar = (resource, record = {}) => {
|
||||||
const [loading, setLoading] = useState(false)
|
const [loading, setLoading] = useState(false)
|
||||||
const notify = useNotify()
|
const notify = useNotify()
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user