Skip to content

Commit

Permalink
fix(templateCache): make sure $state is passed config options before …
Browse files Browse the repository at this point in the history
…checking what they are
  • Loading branch information
perrygovier committed Sep 11, 2014
1 parent f5e986c commit cb9b81d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion js/angular/service/templateCache.js
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ function($stateProvider, $ionicConfigProvider) {
var stateProviderState = $stateProvider.state;
$stateProvider.state = function(stateName, definition) {
// don't even bother if it's disabled. note, another config may run after this, so it's not a catch-all
if($ionicConfigProvider.prefetchTemplates() !== false){
if(typeof definition === 'object' && $ionicConfigProvider.prefetchTemplates() !== false){
var enabled = definition.prefetchTemplate !== false;
if(enabled && isString(definition.templateUrl))templatesToCache.push(definition.templateUrl);
if(angular.isObject(definition.views)){
Expand Down

0 comments on commit cb9b81d

Please sign in to comment.