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

Prioritize resolution of .then #736

Merged
merged 1 commit into from
Jun 10, 2016
Merged

Conversation

brianmhunt
Copy link
Contributor

Closes #735

@brianmhunt
Copy link
Contributor Author

I rebuilt dist/, but it contains a few things that I guess had not yet been merged into master. Hope it's alright; they look innocuous, but happy to remove if preferred.

@brianmhunt
Copy link
Contributor Author

brianmhunt commented Jun 10, 2016

Failed on Node 0.10: Failed: should render streams found while iterating over an array under the heading Running unit tests with /home/travis/build/linkedin/dustjs/node_modules/rhino-1_7r5-bin/rhino1_7R5/js.jar

I've no idea what might be going on there. 😄

* @param elem {*} object to inspect
* @return {Boolean} is `elem` a Thenable?
*/
dust.isThenable = function(elem) {
return elem &&
typeof elem === 'object' &&
return elem && /* Beware: `typeof null` is `object` */
Copy link
Contributor

Choose a reason for hiding this comment

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

We can totally add the null check here

Copy link
Contributor Author

@brianmhunt brianmhunt Jun 10, 2016

Choose a reason for hiding this comment

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

I had a think about this: When elem is null it'll be falsy, so it'll early-out on the elem && .... Testing for null would be redundant (albeit explicit).

There look to be a few tests that ensure this e.g. "scalar null in a # section", so it seems covered.

@sethkinast
Copy link
Contributor

Couple small comments, and a rebase, and 👍 from me

@jimmyhchan @prashn64 @smfoote , one more?

I reran the failing CI test; Rhino isn't the most reliable. Looks fine now.

@brianmhunt
Copy link
Contributor Author

Rebased, typo in the commit message and all. 👀

Let me know if there's anything else (e.g. the explicit null test).

@sethkinast
Copy link
Contributor

👍 looks great

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.

3 participants