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

fix: incorrect value of job name when job name is undefined #532

Merged
merged 2 commits into from
Feb 7, 2023

Conversation

CodyTseng
Copy link
Contributor

Description

name: queue.format('name', jobProps, jobProps.name),

When the jobProps.name is undefined, the default value of BaseAdapter.format(field, data, defaultValue = data) will be jobProps. And then React will throw Error: Minified React error #31;.

@felixmosh felixmosh merged commit 9df98f7 into felixmosh:master Feb 7, 2023
@felixmosh
Copy link
Owner

Thank you @CodyTseng for the PR.

I will release it in few mins

@CodyTseng
Copy link
Contributor Author

I took a closer look and I think queue.format('name', jobProps.name) is better.

Because the second parameter will be passed to the setFormatter. From the documentation, this value should be jobProps.name.

image

@felixmosh
Copy link
Owner

felixmosh commented Feb 7, 2023

The docs are wrong :|
There is a use-case that some users want job name to be consist from other job props, therefore, We pass the entire jobProps to the formatter.
Your solution is enough :].

I've fixed the doc :]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants