File tree Expand file tree Collapse file tree 3 files changed +8
-2
lines changed Expand file tree Collapse file tree 3 files changed +8
-2
lines changed Original file line number Diff line number Diff line change 42
42
},
43
43
"dependencies" : {
44
44
"@cycle/run" : " ^3.0.0" ,
45
- "snabbdom-selector" : " ^1.2.0 " ,
45
+ "snabbdom-selector" : " ^1.3.2 " ,
46
46
"xstream" : " ^11.0.0"
47
47
},
48
48
"devDependencies" : {
Original file line number Diff line number Diff line change @@ -50,6 +50,8 @@ export function addKeys(
50
50
node : VNode ,
51
51
key : string = Math . random ( ) . toString ( )
52
52
) : VNode {
53
+ if ( ! node ) return ;
54
+
53
55
if ( ! node . children ) {
54
56
return { ...node , key : node . key ? node . key : key } ;
55
57
}
Original file line number Diff line number Diff line change @@ -37,7 +37,11 @@ function augmentStartDistance(
37
37
}
38
38
39
39
function moreThanOneChild ( node : VNode ) {
40
- return ! node . children || node . children . length > 1 ;
40
+ if ( Array . isArray ( node ) ) {
41
+ throw new Error ( 'Composed stream should emit VNodes not arrays' ) ;
42
+ }
43
+
44
+ return ! node || node . children . length > 1 ;
41
45
}
42
46
43
47
function notMoreThanOneChild ( node : VNode ) {
You can’t perform that action at this time.
0 commit comments