From 0afe45b3a830bfefc4f9b51823891b99be5261fa Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Sat, 3 Mar 2018 05:36:08 +0100 Subject: Hash hash instead of prefixedHash to scrollToHash function --- packages/website/ts/utils/utils.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'packages/website/ts/utils/utils.ts') diff --git a/packages/website/ts/utils/utils.ts b/packages/website/ts/utils/utils.ts index 27cd87be1..a1e045af7 100644 --- a/packages/website/ts/utils/utils.ts +++ b/packages/website/ts/utils/utils.ts @@ -297,13 +297,13 @@ export const utils = { const baseUrl = `https://${window.location.hostname}${hasPort ? `:${port}` : ''}`; return baseUrl; }, - scrollToHash(hashWithPrefix: string, containerId: string): void { - let hash = hashWithPrefix.slice(1); + scrollToHash(hash: string, containerId: string): void { + let finalHash = hash; if (_.isEmpty(hash)) { - hash = configs.SCROLL_TOP_ID; // scroll to the top + finalHash = configs.SCROLL_TOP_ID; // scroll to the top } - scroller.scrollTo(hash, { + scroller.scrollTo(finalHash, { duration: 0, offset: 0, containerId, -- cgit v1.2.3