Skip to content

Commit

Permalink
Removed extraneous parameter to event emit function
Browse files Browse the repository at this point in the history
- this was never passed to the user because the value below is `1`
- our documentation says the close event doesn't emit any parameters, so
  we can just remove it from the array
  • Loading branch information
daniellockyer committed Dec 27, 2023
1 parent e99160a commit 4ef11bf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/database.cc
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ void Database::Work_AfterClose(napi_env e, napi_status status, void* data) {
}

if (!db->open) {
Napi::Value info[] = { Napi::String::New(env, "close"), argv[0] };
Napi::Value info[] = { Napi::String::New(env, "close") };
EMIT_EVENT(db->Value(), 1, info);
db->Process();
}
Expand Down

0 comments on commit 4ef11bf

Please sign in to comment.