Skip to content

Commit

Permalink
Ensures preserveScrollPosition set on any parent transition will actu…
Browse files Browse the repository at this point in the history
…ally preserveScrollPosition (#149)
  • Loading branch information
Duder-onomy authored and mokeefemomoney committed Aug 3, 2018
1 parent f88e8b7 commit c615a97
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion addon/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,8 @@ export default Mixin.create({
} else {
scrollPosition = get(this, 'service.position');
}
const preserveScrollPosition = get(lastTransition, 'handler.controller.preserveScrollPosition');

const preserveScrollPosition = transitions.some((transition) => get(transition, 'handler.controller.preserveScrollPosition'));

if (!preserveScrollPosition) {
const scrollElement = get(this, 'service.scrollElement');
Expand Down

0 comments on commit c615a97

Please sign in to comment.