diff options
author | Clement Ho <clemmakesapps@gmail.com> | 2017-06-28 19:16:46 +0300 |
---|---|---|
committer | Clement Ho <clemmakesapps@gmail.com> | 2017-06-28 19:16:46 +0300 |
commit | 500d3a990ee7ba51fccd714de2af99986815910b (patch) | |
tree | ed8bf41cdaa339b2dcef1475adaa5ede1888c8d4 /app/assets/javascripts/lib | |
parent | 65c40449401a4f70f25d154f52c21517bdcdc1ce (diff) | |
parent | 6ab12777bc9aa79f37859318bce07d6b5a67acd6 (diff) |
Merge branch 'winh-no-current-user-search-bar' into 'master'
Add condition if there is a current user to DropdownUser
See merge request !12415
Diffstat (limited to 'app/assets/javascripts/lib')
-rw-r--r-- | app/assets/javascripts/lib/utils/dom_utils.js | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/app/assets/javascripts/lib/utils/dom_utils.js b/app/assets/javascripts/lib/utils/dom_utils.js new file mode 100644 index 00000000000..de65ea15a60 --- /dev/null +++ b/app/assets/javascripts/lib/utils/dom_utils.js @@ -0,0 +1,7 @@ +/* eslint-disable import/prefer-default-export */ + +export const addClassIfElementExists = (element, className) => { + if (element) { + element.classList.add(className); + } +}; |