Skip to content

Commit ce755d1

Browse files
committed
Syntax tweak
1 parent 5a633dc commit ce755d1

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

modules/mixins/ScrollContext.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,10 +75,12 @@ var ScrollContext = {
7575
},
7676

7777
updateScroll: function (path, actionType) {
78-
var behavior = this.getScrollBehavior();
78+
if (this._scrollPositions) {
79+
var behavior = this.getScrollBehavior();
80+
var position = this._scrollPositions[path];
7981

80-
if (behavior != null && this._scrollPositions.hasOwnProperty(path)) {
81-
behavior.updateScrollPosition(this._scrollPositions[path], actionType);
82+
if (behavior && position)
83+
behavior.updateScrollPosition(position, actionType);
8284
}
8385
},
8486

0 commit comments

Comments
 (0)