A little message for you

<% if(notifications !== undefined && notifications.length > 0){ notifications.forEach((notification) => { if(notification.type === "success") { %> <% } else if(notification.type === "warning") { %> <% } else if(notification.type === "error") { %> <% } else { %> <% } }); } %>