Skip to content

Conversation

yangmillstheory
Copy link
Contributor

Close #169.

isFunction(payloadCreator),
'Expected payloadCreator to be a function or undefined'
isFunction(payloadCreator) || isNull(payloadCreator),
'Expected payloadCreator to be a function, undefined, or null'
Copy link
Member

Choose a reason for hiding this comment

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

Remove , => undefined or null.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

import identity from 'lodash/identity';
import isFunction from 'lodash/isFunction';
import isUndefined from 'lodash/isUndefined';
import isNull from 'lodash/isNull';
Copy link
Member

Choose a reason for hiding this comment

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

I'd instead use isNil, so we check for null OR undefined.

Copy link
Contributor Author

@yangmillstheory yangmillstheory Nov 23, 2016

Choose a reason for hiding this comment

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

undefined is coerced at the parameter level, so I don't think we need to check for it downstream. Let me know if I'm missing something.

Copy link
Member

@timche timche Nov 23, 2016

Choose a reason for hiding this comment

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

You are right, didn't see it 👍

@yangmillstheory
Copy link
Contributor Author

Do you want to manage the release (along with the #165 and possibly #166)?

@yangmillstheory yangmillstheory merged commit 114115b into master Nov 23, 2016
@timche timche deleted the null-payload-creator branch April 18, 2018 09:22
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