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 floating promise in LevelUP constructor #679

Closed
wants to merge 1 commit into from

Conversation

bjacokes
Copy link

As suggested in #656

Copy link
Member

@vweevers vweevers left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! A few nits. If you feel up to it, can you add a unit test?

@@ -470,6 +470,7 @@ const main = async () => {
| `ready` | Alias of `open` | - |
| `closing` | Store is closing | - |
| `closed` | Store has closed. | - |
| `error` | Constructor had an error | `error` (any) |
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
| `error` | Constructor had an error | `error` (any) |
| `error` | An error occurred | `error` |

The (any) text in the other cells means "any type", that's not the case here.

@@ -54,7 +55,11 @@ function LevelUP (db, options, callback) {
this.options = getOptions(options)
this._db = db
this.db = new DeferredLevelDOWN(db)
this.open(callback)
this.open(callback || function(err) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
this.open(callback || function(err) {
this.open(callback || function (err) {

(You can also run standard --fix to fix style issues automatically)

@vweevers vweevers added the semver-patch Bug fixes that are backward compatible label Sep 26, 2019
@vweevers vweevers added this to In progress in Level (old board) via automation Sep 26, 2019
@vweevers
Copy link
Member

vweevers commented Oct 1, 2019

Superseded by #680. Thanks!

@vweevers vweevers closed this Oct 1, 2019
Level (old board) automation moved this from In progress to Done Oct 1, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
semver-patch Bug fixes that are backward compatible
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

None yet

3 participants