fix(scroll): prevent 'cannot read' exception

This commit is contained in:
Adam Bradley
2014-11-18 22:18:19 -06:00

View File

@@ -47,13 +47,14 @@ function($scope, scrollViewOptions, $timeout, $window, $location, $document, $io
if (!angular.isDefined(scrollViewOptions.bouncing)) {
ionic.Platform.ready(function() {
scrollView.options.bouncing = true;
if (ionic.Platform.isAndroid()) {
// No bouncing by default on Android
scrollView.options.bouncing = false;
// Faster scroll decel
scrollView.options.deceleration = 0.95;
if (scrollView.options) {
scrollView.options.bouncing = true;
if (ionic.Platform.isAndroid()) {
// No bouncing by default on Android
scrollView.options.bouncing = false;
// Faster scroll decel
scrollView.options.deceleration = 0.95;
}
}
});
}