Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Bennett <lbennett@gitlab.com>2019-02-21 09:05:09 +0300
committerLuke Bennett <lbennett@gitlab.com>2019-03-06 15:12:55 +0300
commite107ebc331f676c9419f64d1af539707539a9227 (patch)
tree24fc8951d4f912ad201c5d0227b0a78980a077ec /app/assets/javascripts/clusters
parentf100c9ba158a0ab6f4edaa1de73e107737d4a9d0 (diff)
Refactor PersistentUserCallout instantiations
Uses a new factory method to DRY instantiation.
Diffstat (limited to 'app/assets/javascripts/clusters')
-rw-r--r--app/assets/javascripts/clusters/clusters_bundle.js3
1 files changed, 1 insertions, 2 deletions
diff --git a/app/assets/javascripts/clusters/clusters_bundle.js b/app/assets/javascripts/clusters/clusters_bundle.js
index 6ebd1ad109e..c59fac42038 100644
--- a/app/assets/javascripts/clusters/clusters_bundle.js
+++ b/app/assets/javascripts/clusters/clusters_bundle.js
@@ -119,8 +119,7 @@ export default class Clusters {
static initDismissableCallout() {
const callout = document.querySelector('.js-cluster-security-warning');
-
- if (callout) new PersistentUserCallout(callout); // eslint-disable-line no-new
+ PersistentUserCallout.factory(callout);
}
addListeners() {