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
path: root/app
diff options
context:
space:
mode:
authorPhil Hughes <me@iamphill.com>2017-11-30 11:52:45 +0300
committerPhil Hughes <me@iamphill.com>2017-11-30 11:52:45 +0300
commitc923f96dc7ad4604d8162d96a5bcde44a776032b (patch)
tree87d8df1ac2946243b118627769e22675758c23a8 /app
parent17c53d7d0dcc6739691f1298ddd0c254c9614571 (diff)
parented3fcdd09bed143b0397d8dd9aaf7b9350597920 (diff)
Merge branch '40671-fix-empty-blank-flash-messages' into 'master'
Remove blank/empty flash messages caused by nil Closes #40671 See merge request gitlab-org/gitlab-ce!15658
Diffstat (limited to 'app')
-rw-r--r--app/views/layouts/_flash.html.haml8
1 files changed, 5 insertions, 3 deletions
diff --git a/app/views/layouts/_flash.html.haml b/app/views/layouts/_flash.html.haml
index 1db32379df3..05ddd0ec733 100644
--- a/app/views/layouts/_flash.html.haml
+++ b/app/views/layouts/_flash.html.haml
@@ -1,6 +1,8 @@
.flash-container.flash-container-page
-# We currently only support `alert`, `notice`, `success`
- flash.each do |key, value|
- %div{ class: "flash-#{key}" }
- %div{ class: (container_class) }
- %span= value
+ -# Don't show a flash message if the message is nil
+ - if value
+ %div{ class: "flash-#{key}" }
+ %div{ class: (container_class) }
+ %span= value