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

ensure timeout is set to default value (fixes #225) #226

Merged
merged 1 commit into from
Jul 6, 2018
Merged

ensure timeout is set to default value (fixes #225) #226

merged 1 commit into from
Jul 6, 2018

Conversation

zackschuster
Copy link
Collaborator

No description provided.

@@ -51,6 +51,10 @@ class SMTP extends EventEmitter {
constructor(options = {}) {
super();

if (options.timeout == null) {
Copy link
Owner

Choose a reason for hiding this comment

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

i guess the way to think about this is that if timeout is not a number, then we default to TIMEOUT.

we could try to improve on default values using destructuring: https://wesbos.com/destructuring-default-values/ and then checking for proper types afterwards.

i'll merge this for now, but something to keep in mind.

@eleith eleith merged commit 01d37c8 into eleith:master Jul 6, 2018
@zackschuster zackschuster deleted the fix-timeout branch July 6, 2018 16:26
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