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:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-10-14 18:08:42 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-10-14 18:08:42 +0300
commit99670fc6a027caee34a6537c8def2e998d1ac5c2 (patch)
treea2ea3ec131d3cb155e13140c8486f1be2a5822b4 /app/assets/javascripts/tooltips
parentc9ca178ba4c9a3e48d9d069f7d7486a29827cc61 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/javascripts/tooltips')
-rw-r--r--app/assets/javascripts/tooltips/index.js8
1 files changed, 6 insertions, 2 deletions
diff --git a/app/assets/javascripts/tooltips/index.js b/app/assets/javascripts/tooltips/index.js
index debb36dc53f..9f5dce4183c 100644
--- a/app/assets/javascripts/tooltips/index.js
+++ b/app/assets/javascripts/tooltips/index.js
@@ -1,6 +1,6 @@
import Vue from 'vue';
import jQuery from 'jquery';
-import { toArray, isFunction } from 'lodash';
+import { toArray, isFunction, isElement } from 'lodash';
import Tooltips from './components/tooltips.vue';
let app;
@@ -54,7 +54,11 @@ const handleTooltipEvent = (rootTarget, e, selector, config = {}) => {
}
};
-const applyToElements = (elements, handler) => toArray(elements).forEach(handler);
+const applyToElements = (elements, handler) => {
+ const iterable = isElement(elements) ? [elements] : toArray(elements);
+
+ toArray(iterable).forEach(handler);
+};
const invokeBootstrapApi = (elements, method) => {
if (isFunction(elements.tooltip)) {