Remove dependency on lodash.get

This commit is contained in:
Deluan
2021-05-11 22:08:07 -04:00
parent 978933aa48
commit 4699902369
6 changed files with 5 additions and 15 deletions
+1 -2
View File
@@ -1,5 +1,4 @@
import 'react-jinke-music-player/assets/index.css'
import get from 'lodash.get'
import { v4 as uuidv4 } from 'uuid'
import subsonic from '../subsonic'
import config from '../config'
@@ -85,7 +84,7 @@ export const playQueueReducer = (previousState = initialState, payload) => {
})
return { ...previousState, queue, clear: false, playIndex: undefined }
case PLAYER_PLAY_NEXT:
current = get(previousState.current, 'uuid', '')
current = previousState.current?.uuid || ''
newQueue = []
let foundPos = false
previousState.queue.forEach((item) => {