File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -341,12 +341,13 @@ export class NavControllerBase extends Ion implements NavController {
341341 return convertToViews ( this . _linker , insertViews ) . then ( ( viewControllers ) => {
342342 assert ( insertViews . length === viewControllers . length , 'lengths does not match' ) ;
343343
344+ viewControllers = viewControllers . filter ( v => v !== null ) ;
345+ if ( viewControllers . length === 0 ) {
346+ throw 'invalid views to insert' ;
347+ }
344348 // Check all the inserted view are correct
345349 for ( var i = 0 ; i < viewControllers . length ; i ++ ) {
346350 var view = viewControllers [ i ] ;
347- if ( ! view ) {
348- throw 'invalid views to insert' ;
349- }
350351 var nav = view . _nav ;
351352 if ( nav && nav !== this ) {
352353 throw 'inserted view was already inserted' ;
You can’t perform that action at this time.
0 commit comments