File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 463463 } ] ;
464464
465465 this . config = function ( config ) {
466- jsLoader = config . jsLoader || config . asyncLoader ;
467-
468- if ( angular . isDefined ( ) && ! angular . isFunction ( jsLoader ) ) {
469- throw ( 'The js loader needs to be a function' ) ;
466+ if ( angular . isDefined ( config . jsLoader ) || angular . isDefined ( config . asyncLoader ) ) {
467+ if ( ! angular . isFunction ( jsLoader ) ) {
468+ throw ( 'The js loader needs to be a function' ) ;
469+ }
470+ jsLoader = config . jsLoader || config . asyncLoader ;
470471 }
471472
472473 if ( angular . isDefined ( config . cssLoader ) ) {
474+ if ( ! angular . isFunction ( cssLoader ) ) {
475+ throw ( 'The css loader needs to be a function' ) ;
476+ }
473477 cssLoader = config . cssLoader ;
474478 }
475479
476480 if ( angular . isDefined ( config . templatesLoader ) ) {
481+ if ( ! angular . isFunction ( templatesLoader ) ) {
482+ throw ( 'The template loader needs to be a function' ) ;
483+ }
477484 templatesLoader = config . templatesLoader ;
478485 }
479486
You can’t perform that action at this time.
0 commit comments