summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/lib
diff options
context:
space:
mode:
authormfluharty <mfluharty@gitlab.com>2019-03-28 14:00:44 -0600
committermfluharty <mfluharty@gitlab.com>2019-04-02 23:58:20 -0600
commiteb95100c066d2d70a2128ea9ac6776f720b0777a (patch)
tree9d37033870f8062f5fc63464d811e3c6ae420306 /app/assets/javascripts/lib
parent06b88af04657be961a4da97a586706fb99eb6a27 (diff)
downloadgitlab-ce-eb95100c066d2d70a2128ea9ac6776f720b0777a.tar.gz
Refactor tests to follow conventions Add XSS test Eliminate a few unnecessary lines, comments, and parameters Use Vue.set for nested state changes
Diffstat (limited to 'app/assets/javascripts/lib')
-rw-r--r--app/assets/javascripts/lib/utils/text_utility.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/assets/javascripts/lib/utils/text_utility.js b/app/assets/javascripts/lib/utils/text_utility.js
index 386d69ea430..1b7f8732c65 100644
--- a/app/assets/javascripts/lib/utils/text_utility.js
+++ b/app/assets/javascripts/lib/utils/text_utility.js
@@ -172,8 +172,8 @@ export const splitCamelCase = string =>
* @param {String} string A string namespace,
* i.e. "My Group / My Subgroup / My Project"
*/
-export const truncateNamespace = string => {
- if (_.isUndefined(string) || _.isNull(string) || !_.isString(string)) {
+export const truncateNamespace = (string = '') => {
+ if (_.isNull(string) || !_.isString(string)) {
return '';
}