mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2026-03-13 10:22:08 +08:00
fix(scroll): prevent 'cannot read' exception
This commit is contained in:
15
js/angular/controller/scrollController.js
vendored
15
js/angular/controller/scrollController.js
vendored
@@ -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;
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user