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

DatabaseManager.get() - return null instead of undefined on empty result #503

Open
ondratra opened this issue Jul 20, 2022 · 0 comments
Open
Labels

Comments

@ondratra
Copy link
Contributor

At the moment, DatabaseManager.get() function returns undefined when no record is found. This was in line with older TypeORM!s EntityManager that we were using until recently when we introduced a newer TypeORM version in #491.

Let's change the return value to null to align the returning value with EntityManager. The null value is a better representation of empty results anyway, plus easier to work with in JS.

After that, we need to update the code in Joystream QN to reflect this change.

@ondratra ondratra added the enhancement New feature or request label Jul 20, 2022
@ondratra ondratra self-assigned this Jul 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants