Skip to content
This repository was archived by the owner on Jan 25, 2021. It is now read-only.
This repository was archived by the owner on Jan 25, 2021. It is now read-only.

Rendering a landing page resulting in progress bar not completing. #52

Description

@davidmulligan

Hi,

I am facing an issue I was hoping you could help with. I have a secured app that uses the progress bar and generally all is well, except when I have an onBeforeAction hook that will render a landing page if the user is not logged in.

When I visit a page and Im not secured, the landing page that is render the progress bar, as well as the spinner but neither then disappears. I assume this is because the hook has not completed as I don't have a next() method call. Not sure on the best way to solve this (still fairly new). Please see below for an example of my hook code:

var requireLogin = function() {
    if (!Meteor.user()) {
        if (Meteor.loggingIn()) {
            this.render(this.loadingTemplate);
        } else {
            this.render('landingPage');
        }
    } else {
        this.next();
    }
}
Router.onBeforeAction(requireLogin, {except: ['landingPage']});

Thanks

Dave

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions