diff --git a/addon/services/router-scroll.js b/addon/services/router-scroll.js index 1b7ee130..32b1a4e4 100644 --- a/addon/services/router-scroll.js +++ b/addon/services/router-scroll.js @@ -30,7 +30,7 @@ export default Service.extend({ const stateId = get(window, 'history.state.id'); set(this, 'key', stateId); - const key = getWithDefault(this, 'key', '-1'); + const key = get(this, 'key') || '-1'; return getWithDefault(scrollMap, key, { x: 0, y: 0 }); }).volatile(),