diff options
Diffstat (limited to 'app/assets/javascripts/error_tracking/details.js')
-rw-r--r-- | app/assets/javascripts/error_tracking/details.js | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/app/assets/javascripts/error_tracking/details.js b/app/assets/javascripts/error_tracking/details.js index 1a92681374b..55ab362f805 100644 --- a/app/assets/javascripts/error_tracking/details.js +++ b/app/assets/javascripts/error_tracking/details.js @@ -8,28 +8,30 @@ import csrf from '~/lib/utils/csrf'; Vue.use(VueApollo); export default () => { + const selector = '#js-error_details'; + + const domEl = document.querySelector(selector); + const { + issueId, + projectPath, + issueUpdatePath, + issueStackTracePath, + projectIssuesPath, + } = domEl.dataset; + const apolloProvider = new VueApollo({ defaultClient: createDefaultClient(), }); // eslint-disable-next-line no-new new Vue({ - el: '#js-error_details', + el: selector, apolloProvider, components: { ErrorDetails, }, store, render(createElement) { - const domEl = document.querySelector(this.$options.el); - const { - issueId, - projectPath, - issueUpdatePath, - issueStackTracePath, - projectIssuesPath, - } = domEl.dataset; - return createElement('error-details', { props: { issueId, |