You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
the key thing is: "id" is a field I'm passing in. it comes from another part of my app and I expected it to be ignored by react-music-player.
However, react-music-player gets confused about the first item in the playlist (with .id == 0) and reoders it at the end. I didn't realize that "id" was a field used internally. The conflict causes odd behavior like the audiolist sorting being messed up.
If I remove the "id" field, everything works as inteded. If I leave it, everything is off by one when using playIndex.
Reproduce Link
Steps to Reproduce
Expected Behavior
Current Behavior
System information
Comments
I'll try and post a better repro when I have time.
It has something to do with the internal code looking up the track id:
Hello @binary1230, This bug/feature has been fixed/done and will be released together with the next release.
你好 @binary1230,这个bug/feature 已经修复/完成, 会在下个版本一起发布。
Version
tested on 4.22.1 and 4.21.1
Description
Steps
Given input like this:
the key thing is: "id" is a field I'm passing in. it comes from another part of my app and I expected it to be ignored by react-music-player.
However, react-music-player gets confused about the first item in the playlist (with .id == 0) and reoders it at the end. I didn't realize that "id" was a field used internally. The conflict causes odd behavior like the audiolist sorting being messed up.
If I remove the "id" field, everything works as inteded. If I leave it, everything is off by one when using playIndex.
Reproduce Link
Steps to Reproduce
Expected Behavior
Current Behavior
System information
Comments
I'll try and post a better repro when I have time.
It has something to do with the internal code looking up the track id:
react-music-player/src/index.js
Line 837 in d76cb6b
react-music-player/src/index.js
Line 1864 in d76cb6b
Possible solutions:
delete audio.id
)The text was updated successfully, but these errors were encountered: