diff options
author | Luke Bennett <lbennett@gitlab.com> | 2019-02-21 06:05:09 +0000 |
---|---|---|
committer | Luke Bennett <lbennett@gitlab.com> | 2019-03-06 12:12:55 +0000 |
commit | e107ebc331f676c9419f64d1af539707539a9227 (patch) | |
tree | 24fc8951d4f912ad201c5d0227b0a78980a077ec /app/assets/javascripts/pages/projects/clusters/index/index.js | |
parent | f100c9ba158a0ab6f4edaa1de73e107737d4a9d0 (diff) | |
download | gitlab-ce-e107ebc331f676c9419f64d1af539707539a9227.tar.gz |
Refactor PersistentUserCallout instantiations
Uses a new factory method to DRY instantiation.
Diffstat (limited to 'app/assets/javascripts/pages/projects/clusters/index/index.js')
-rw-r--r-- | app/assets/javascripts/pages/projects/clusters/index/index.js | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/app/assets/javascripts/pages/projects/clusters/index/index.js b/app/assets/javascripts/pages/projects/clusters/index/index.js index 21efc4f6d00..30d519d0e37 100644 --- a/app/assets/javascripts/pages/projects/clusters/index/index.js +++ b/app/assets/javascripts/pages/projects/clusters/index/index.js @@ -2,6 +2,5 @@ import PersistentUserCallout from '~/persistent_user_callout'; document.addEventListener('DOMContentLoaded', () => { const callout = document.querySelector('.gcp-signup-offer'); - - if (callout) new PersistentUserCallout(callout); // eslint-disable-line no-new + PersistentUserCallout.factory(callout); }); |