Jimdo / angular-fontselect

A fontselect directive for AngularJS
MIT License
29 stars 9 forks source link

$scope.current.sort can be undefined #24

Closed joscha closed 10 years ago

joscha commented 10 years ago

Sometimes the error

TypeError: Cannot read property 'attr' of undefined
    at Scope.$scope.getFilteredFonts (js/bower_components/angular-fontselect/dist/angular-fontselect.js:1961:46)
    at js/bower_components/angular/angular.js:10288:21
    at OPERATORS.| (js/bower_components/angular/angular.js:9616:74)
    at extend.constant (js/bower_components/angular/angular.js:10046:14)
    at OPERATORS.| (js/bower_components/angular/angular.js:9616:74)
    at extend.constant (js/bower_components/angular/angular.js:10046:14)
    at Object.$watchCollectionWatch (js/bower_components/angular/angular.js:11726:22)
    at Scope.$digest (js/bower_components/angular/angular.js:11890:40)
    at Scope.$apply (js/bower_components/angular/angular.js:12151:24)
    at HTMLAnchorElement.<anonymous> (js/bower_components/angular/angular.js:18085:21) 

gets thrown. This happens, because $scope.current.sort can be undefined in directive.fontlist.js

Xiphe commented 10 years ago

unable to reproduce this atm. may have been fixed in previous release.