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

Throw if composed stream emits array #18

Merged
merged 1 commit into from
Oct 12, 2017
Merged

Throw if composed stream emits array #18

merged 1 commit into from
Oct 12, 2017

Conversation

ntilwalli
Copy link
Contributor

Ensures the user does not emit arrays directly, but wraps VNode arrays in a parent VNode before composing with makeSortable

@ntilwalli
Copy link
Contributor Author

I also updated snabbdom-selector and allowed children nodes to be falsy...

@@ -50,6 +50,8 @@ export function addKeys(
node: VNode,
key: string = Math.random().toString()
): VNode {
if (!node) return;
Copy link
Collaborator

Choose a reason for hiding this comment

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

I would throw here too

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's not meant to be an error check. I added that line to skip falsy children VNodes like null and undefined, which is something @cycle/dom offers.

@jvanbruegge
Copy link
Collaborator

Will merge and publish once home

@jvanbruegge jvanbruegge merged commit 49d7f0b into cyclejs-community:master Oct 12, 2017
@jvanbruegge
Copy link
Collaborator

Published in 2.4.0
Sorry it took so long

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.

None yet

2 participants