From 975f4bccb62b8b17fb5c9831d2406958928e94ec Mon Sep 17 00:00:00 2001 From: Arjan Singh Date: Mon, 15 Aug 2016 15:34:00 -0700 Subject: [PATCH] [service:router-scroll] Use `get` instead of `getWithDefaults`. `getWithDefaults` returns the value (including `null`) for any key that is defined. This caused a failure in ember@1.13 because you cannot do a get lookup if the lookup value is `null`. --- addon/services/router-scroll.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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(),