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-01-29 21:08:47 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-01-29 21:08:47 +0300
commit6b9d3a4e8351e662c4586b24bb152de78ae9e3bf (patch)
tree883e9db60c047c54418fc1d2b1c5517f97e0f185 /app/assets/javascripts/editor/utils.js
parent23288f62da73fb0e30d8e7ce306665e8fda1b932 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/javascripts/editor/utils.js')
-rw-r--r--app/assets/javascripts/editor/utils.js11
1 files changed, 11 insertions, 0 deletions
diff --git a/app/assets/javascripts/editor/utils.js b/app/assets/javascripts/editor/utils.js
new file mode 100644
index 00000000000..d8b6396b671
--- /dev/null
+++ b/app/assets/javascripts/editor/utils.js
@@ -0,0 +1,11 @@
+export const clearDomElement = el => {
+ if (!el || !el.firstChild) return;
+
+ while (el.firstChild) {
+ el.removeChild(el.firstChild);
+ }
+};
+
+export default () => ({
+ clearDomElement,
+});