diff --git a/package/gluon-web-model/files/lib/gluon/web/view/model/warning.html b/package/gluon-web-model/files/lib/gluon/web/view/model/warning.html
index af063ec5..8394bb13 100644
--- a/package/gluon-web-model/files/lib/gluon/web/view/model/warning.html
+++ b/package/gluon-web-model/files/lib/gluon/web/view/model/warning.html
@@ -1,14 +1,14 @@
-<%- if self.title or self.content then -%>
+<%- if not self.hide then -%>
>
<%- if self.content then -%>
- <%=self.content%>
+ <%= self.content %>
<%- else -%>
- <%=self.title%>
- <%=self.description%>
+ <%= self.title %>
+ <%= self.description %>
<%- end -%>
<%- end -%>
diff --git a/package/gluon-web-private-wifi/luasrc/lib/gluon/config-mode/model/admin/privatewifi.lua b/package/gluon-web-private-wifi/luasrc/lib/gluon/config-mode/model/admin/privatewifi.lua
index 9d29b2b6..c69d22c3 100644
--- a/package/gluon-web-private-wifi/luasrc/lib/gluon/config-mode/model/admin/privatewifi.lua
+++ b/package/gluon-web-private-wifi/luasrc/lib/gluon/config-mode/model/admin/privatewifi.lua
@@ -27,10 +27,11 @@ local enabled = s:option(Flag, "enabled", translate("Enabled"))
enabled.default = uci:get('wireless', primary_iface) and not uci:get_bool('wireless', primary_iface, "disabled")
local warning = s:element('model/warning', {
- content = mesh_on_wan and translate(
+ content = translate(
'Meshing on WAN interface is enabled. ' ..
'This can lead to problems.'
- ) or nil,
+ ),
+ hide = not mesh_on_wan,
}, 'warning')
warning:depends(enabled, true)