Skip to content

Commit 48d59ab

Browse files
committed
Style tweak
1 parent 2a75f3e commit 48d59ab

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

modules/stores/PathStore.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,11 @@ function recordScrollPosition(path) {
2222
};
2323
}
2424

25+
function updateScrollPosition(path) {
26+
var p = PathStore.getScrollPosition(path);
27+
window.scrollTo(p.x, p.y);
28+
}
29+
2530
var _location;
2631

2732
/**
@@ -115,8 +120,7 @@ var PathStore = {
115120
break;
116121

117122
case LocationActions.UPDATE_SCROLL:
118-
var p = PathStore.getScrollPosition(currentPath);
119-
window.scrollTo(p.x, p.y);
123+
updateScrollPosition(currentPath);
120124
break;
121125
}
122126
})

0 commit comments

Comments
 (0)