Skip to content
This repository was archived by the owner on Dec 12, 2018. It is now read-only.
This repository was archived by the owner on Dec 12, 2018. It is now read-only.

User undefined error after converting .jade flawlessly to .ejs #13

@KaurKirikall

Description

@KaurKirikall

Converted all the views to .ejs and everything except the login page works. I found out that error comes from user being undefined if logged out and if I remove this navbar snippet that mentions user. Everything works. However the jade version is completely identical.

<ul class="nav nav-pills pull-right">
          <li>
            <a href="/")>Home</a>
            </li>
            <%
          if (user) { 
           %>
            <li>
              <a href="/dashboard">Dashboard</a>
                </li>
            <li>
              <a href="/logout">Log out</a>
            </li>
            <% } else { %>
                <li>
              <a href="/login">Login</a>
                </li>
            <% } %>
        </ul>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions