From 370bb90b28b628dbe0ba25ab6c549a480836bd73 Mon Sep 17 00:00:00 2001 From: Sebastian Helbig Date: Wed, 9 Aug 2017 22:21:12 +0200 Subject: [PATCH] removing some lines --- README.md | 2 +- addon/index.js | 1 - addon/services/router-scroll.js | 1 - 3 files changed, 1 insertion(+), 3 deletions(-) diff --git a/README.md b/README.md index ec523e23..68f972cd 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ ember install ember-router-scroll ``` ### Options -You can specify the id of an element for which the scroll position is saved and set. Default is `window` for using the scroll position of the whole viewport. You can pass an options object in your applications `config/environment.js` file. +You can specify the id of an element for which the scroll position is saved and set. Default is `window` for using the scroll position of the whole viewport. You can pass an options object in your application's `config/environment.js` file. ```javascript ENV['routerScroll'] = { diff --git a/addon/index.js b/addon/index.js index 064e2653..77c8564e 100644 --- a/addon/index.js +++ b/addon/index.js @@ -37,7 +37,6 @@ export default Mixin.create({ if (!preserveScrollPosition) { if ('window' === scrollElement) { window.scrollTo(scrollPosition.x, scrollPosition.y); - } else if ('#' === scrollElement.charAt(0)) { let element = document.getElementById(scrollElement.substring(1)); diff --git a/addon/services/router-scroll.js b/addon/services/router-scroll.js index 0611529d..09480cb3 100644 --- a/addon/services/router-scroll.js +++ b/addon/services/router-scroll.js @@ -25,7 +25,6 @@ export default Service.extend({ if ('window' === scrollElement) { x = window.scrollX; y = window.scrollY; - } else if ('#' === scrollElement.charAt(0)) { let element = document.getElementById(scrollElement.substring(1));