From e0bbadc2d2c50fce75ef1166d0991a5d04ef5e0a Mon Sep 17 00:00:00 2001 From: Phil Hughes Date: Thu, 7 Dec 2017 12:30:53 +0000 Subject: use exported methods instead of gl.utils --- app/assets/javascripts/merge_request_tabs.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'app/assets/javascripts/merge_request_tabs.js') diff --git a/app/assets/javascripts/merge_request_tabs.js b/app/assets/javascripts/merge_request_tabs.js index 54c1b7a268e..54f4e33437d 100644 --- a/app/assets/javascripts/merge_request_tabs.js +++ b/app/assets/javascripts/merge_request_tabs.js @@ -11,6 +11,7 @@ import { handleLocationHash, isMetaClick, } from './lib/utils/common_utils'; +import * as urlUtils from './lib/utils/url_utility'; import initDiscussionTab from './image_diff/init_discussion_tab'; import Diff from './diff'; @@ -317,7 +318,7 @@ import Diff from './diff'; // Scroll any linked note into view // Similar to `toggler_behavior` in the discussion tab - const hash = window.gl.utils.getLocationHash(); + const hash = urlUtils.getLocationHash(); const anchor = hash && $container.find(`.note[id="${hash}"]`); if (anchor && anchor.length > 0) { const notesContent = anchor.closest('.notes_content'); -- cgit v1.2.1 From 6bb4442054a3804224f84c63fa7c5657508c4ec6 Mon Sep 17 00:00:00 2001 From: Phil Hughes Date: Mon, 11 Dec 2017 12:28:11 +0000 Subject: updated imports --- app/assets/javascripts/merge_request_tabs.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'app/assets/javascripts/merge_request_tabs.js') diff --git a/app/assets/javascripts/merge_request_tabs.js b/app/assets/javascripts/merge_request_tabs.js index 54f4e33437d..589e65647ac 100644 --- a/app/assets/javascripts/merge_request_tabs.js +++ b/app/assets/javascripts/merge_request_tabs.js @@ -11,7 +11,7 @@ import { handleLocationHash, isMetaClick, } from './lib/utils/common_utils'; -import * as urlUtils from './lib/utils/url_utility'; +import { getLocationHash } from './lib/utils/url_utility'; import initDiscussionTab from './image_diff/init_discussion_tab'; import Diff from './diff'; @@ -318,7 +318,7 @@ import Diff from './diff'; // Scroll any linked note into view // Similar to `toggler_behavior` in the discussion tab - const hash = urlUtils.getLocationHash(); + const hash = getLocationHash(); const anchor = hash && $container.find(`.note[id="${hash}"]`); if (anchor && anchor.length > 0) { const notesContent = anchor.closest('.notes_content'); -- cgit v1.2.1