mirror of
https://github.com/koel/koel.git
synced 2026-04-25 16:56:02 +03:00
[GH-ISSUE #525] Strange behavior with equalizer #370
Labels
No labels
Authentication
Dependencies
Documentation
Feature Request
Flac
Help Wanted
Installation/Setup
Integration
Mobile
PR Welcome
Pending Release
Performance
Playlist
S3
Search
Sync
[Pri] Low
[Pri] Normal
[Status] Keep Open
[Status] Needs Author Reply
[Status] Needs Review
[Status] Stale
[Status] Will Implement
[Type] Blessed
[Type] Bug
[Type] Duplicate
[Type] Enhancement
[Type] Help Request
[Type] Question
[Type] Task
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/koel-koel#370
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @X-Ryl669 on GitHub (Jan 23, 2017).
Original GitHub issue: https://github.com/koel/koel/issues/525
Depending on the browser, I'm experiencing a strange behavior with the
resources/assets/js/components/site-footer/equalizer.vueOn some faulty browser, it seems that
loadPreset()is called beforecreateSliders().This causes an exception when it tries to access el.noUiSlider that's undefined.
This then prevents Koel to start.
loadPreset()is triggered by thewatch::selectedPresetIndexI'm not sure about this interpretation, but it seems that the watched's property is used before the player is even created.
What's strange, is that it does not happen on some other computers.
I've traced it a bit more. It happens on the computers were an equalizer preset was set (not -1), and Koel is reloaded (cmd + r)
I've put a breakpoint on the
init(player)method, and it's called and thecreateSliders()is scheduled inthis.$nextTick(this.createSliders).However, the watcher is triggered before the "nextTick" functions' list is called, leading to using an undefined property in
loadPreset()ofel.noUiSliderWhat is the expected ordering of method here ? Shouldn't watch'ed properties be postponed until the complete component is created, including async creation (as the code is expecting), or is the code wrong and instead,
loadPreset()should be ignored in the watcher and be called in the end ofcreateSlider()?Edit: Ok, I think I've a solution. Because of the watcher, the line that set the
selectedPresetIndexshould be in thecreateSlider()method.Thus, the change should be:
@thallian commented on GitHub (Jan 25, 2017):
I can confirm that this patch resolved the issue for me with Koel v3.5.4 (it occurred with Firefox Nightly).
@daniele-athome commented on GitHub (Jan 30, 2017):
Confirming the bug on latest Google Chrome. And the patch provided by @X-Ryl669 fixes it on Koel v3.5.4.
@phanan commented on GitHub (Feb 1, 2017):
Weird, I don't experience this bug at all. Anyway, @X-Ryl669 can you send a PR over? Thanks!
@X-Ryl669 commented on GitHub (Feb 9, 2017):
Ok, please check PR#538