Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using master branch leads to Javascript TypeError #102

Closed
Whitie opened this issue Jan 21, 2023 · 1 comment · Fixed by #103
Closed

Using master branch leads to Javascript TypeError #102

Whitie opened this issue Jan 21, 2023 · 1 comment · Fixed by #103
Labels
bug Something isn't working

Comments

@Whitie
Copy link
Contributor

Whitie commented Jan 21, 2023

The commit 17ac00d introduced a static method to retrieve the bar colors. Calling a static method from the constructor fails with a TypeError. See https://stackoverflow.com/questions/37002804/calling-static-method-from-constructor-es6 for explanation.
Line 25 of celery_progress.js must be changed from:

this.barColors = Object.assign({}, getBarColorsDefault(), options.barColors);

to:

this.barColors = Object.assign({}, this.constructor.getBarColorsDefault(), options.barColors);

It's just a little change, should I make a pull request for this?

Whitie

@czue
Copy link
Owner

czue commented Jan 21, 2023

Eep, sorry about that! A PR would be great!

@czue czue added the bug Something isn't working label Jan 21, 2023
@czue czue closed this as completed in #103 Jan 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants