Skip to content

routeCollection is empty #101

@hypeJunction

Description

@hypeJunction

If routes are defined after the app has been instantiated, the routeCollection[] is empty, and as such forPageLoad request throws an error

To reproduce:

var router = Davis(function() {
  this.settings = {
    linkSelector: scope + ' a',
    formSelector: scope + ' form',
    generateRequestOnPageLoad: true,
    throwErrors: true,
    handleRouteNotFound: false,
  };
});

router.get('/post/:id', function());
router.start();

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