Changeset 7054


Ignore:
Timestamp:
10/20/16 13:55:47 (8 years ago)
Author:
Leif-Jöran
Message:

Removed further path length assumptions ...

File:
1 edited

Legend:

Unmodified
Added
Removed
  • SRUAggregator/trunk/src/main/resources/assets/js/main.jsx

    r7053 r7054  
    605605function isEmbeddedView() {
    606606        var path = window.location.pathname.split('/');
    607         return (path.length >= 3 && path[2] === 'embed');
     607        return (path.length >= 3 && path[path.length - 1] === 'embed');
    608608}
    609609
     
    616616        if (!this) throw "routeFromLocation must be bound to main";
    617617        var path = window.location.pathname.split('/');
    618         if (path.length === 3) {
    619                 var p = path[2];
     618        if (path.length >= 3) {
     619                var p = path[path.length - 1];
    620620                if (p === 'help') {
    621621                        this.toHelp(false);
Note: See TracChangeset for help on using the changeset viewer.