brunotavares/Ext.ux.Router

Router.js line 209 trim() function does not work on old browsers

Closed this issue · 3 comments

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, '');
    }
}

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

https://github.com/brunotavares/Ext.ux.Router/tree/pre

Hi,

Thank you for your work, it's awesome!

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.