swipely / aviator

Aviator is a single-page front-end router built for modularity.
MIT License
143 stars 6 forks source link

Exception when no root specified #68

Open flahertyb opened 9 years ago

flahertyb commented 9 years ago

We're used to always having '/partners' - but when no root is specified (and it defaults to ""), you get an invalid RegEx from this guy:

  /**
  @method _removeURIRoot
  @param {String} uri '/partners/s/foo-bar'
  @return {String} uri '/s/foo-bar'
  **/
  _removeURIRoot: function (uri) {
    var rootRegex = new RegExp('^' + this.root);

    return uri.replace(rootRegex, '');
  }
barnabyc commented 9 years ago

Ah, yes, we definitely assume a prefix but should be straight forward to accommodate without.

barnabyc commented 8 years ago

@flahertyb were you able to work around/fix this? Would love if you were able to open a PR.

flahertyb commented 8 years ago
ERROR: Permission to swipely/aviator.git denied to flahertyb.
fatal: Could not read from remote repository.

:(

hojberg commented 8 years ago

@flahertyb oh i didn't realize. I added you as a collaborator now.