Router.js line 209 trim() function does not work on old browsers
Closed this issue · 3 comments
gabsoftware commented
The following line causes old browsers to fail:
uri = (uri||"").toString().trim();
Fix: add the following code earlier in your code:
if(typeof String.prototype.trim !== 'function')
{
String.prototype.trim = function()
{
return this.replace(/^\s+|\s+$/g, '');
}
}
brunotavares commented
Thanks for the report. I'm currently working on a major change that will make the router engine way better. You can check a preview on the "pre" branch
gabsoftware commented
Hi,
Thank you for your work, it's awesome!
brunotavares commented
Thanks for the feedback. It should be working properly now with the new version. I already merged "pre" into "master" with the new v2.0 tag.