File tree Expand file tree Collapse file tree 3 files changed +31
-5
lines changed
Expand file tree Collapse file tree 3 files changed +31
-5
lines changed Original file line number Diff line number Diff line change @@ -162,15 +162,14 @@ function getType (fn) {
162162}
163163
164164function isBooleanType ( fn ) {
165- const isBoolean = ( fnItem ) => getType ( fnItem ) === 'Boolean'
166-
167165 if ( ! Array . isArray ( fn ) ) {
168- return isBoolean ( fn )
166+ return getType ( fn ) === 'Boolean'
169167 }
170168 for ( let i = 0 , len = fn . length ; i < len ; i ++ ) {
171- if ( isBoolean ( fn [ i ] ) ) {
169+ if ( getType ( fn [ i ] ) === 'Boolean' ) {
172170 return true
173171 }
174172 }
173+ /* istanbul ignore next */
175174 return false
176175}
Original file line number Diff line number Diff line change @@ -565,7 +565,10 @@ describe('Component slot', () => {
565565 template : `<div><slot name="a"></slot><slot></slot></div>`
566566 } ,
567567 child : {
568- template : '<div><slot></slot></div>'
568+ functional : true ,
569+ render ( h , { slots } ) {
570+ return h ( 'div' , slots ( ) . default )
571+ }
569572 }
570573 }
571574 } ) . $mount ( )
Original file line number Diff line number Diff line change @@ -404,4 +404,28 @@ describe('Directive v-for', () => {
404404 expect ( vm . $el . innerHTML ) . toContain ( '<div>Two!</div><p>One!</p>' )
405405 } ) . then ( done )
406406 } )
407+
408+ it ( 'multi nested array reactivity' , done => {
409+ const vm = new Vue ( {
410+ data : {
411+ list : [ [ [ 'foo' ] ] ]
412+ } ,
413+ template : `
414+ <div>
415+ <div v-for="i in list">
416+ <div v-for="j in i">
417+ <div v-for="k in j">
418+ {{ k }}
419+ </div>
420+ </div>
421+ </div>
422+ </div>
423+ `
424+ } ) . $mount ( )
425+ expect ( vm . $el . textContent ) . toMatch ( / \s + f o o \s + / )
426+ vm . list [ 0 ] [ 0 ] . push ( 'bar' )
427+ waitForUpdate ( ( ) => {
428+ expect ( vm . $el . textContent ) . toMatch ( / \s + f o o \s + b a r \s + / )
429+ } ) . then ( done )
430+ } )
407431} )
You can’t perform that action at this time.
0 commit comments