cancel
Showing results for 
Search instead for 
Did you mean: 

There is a question when intergrate with diagram-viewer.

jin1
Champ in-the-making
Champ in-the-making
Under the diagram-viewer folder,the index.html is contain this code snippet:

var baseUrl = window.document.location.protocol + "//" + window.document.location.host + "/";
var shortenedUrl = window.document.location.href.replace(baseUrl, "");
baseUrl = baseUrl + shortenedUrl.substring(0, shortenedUrl.indexOf("/"));

which is use to append the baseUrl String.
But, when we deploy the webapp to the ROOT contextPath(such as "/"),the
shortenedUrl.substring(0, shortenedUrl.indexOf("/"));
can not get the contextPath,and make the wrong append operate.
How can we fix this?
1 REPLY 1

jbarrez
Star Contributor
Star Contributor
Hmm that seems to be a bug. A pull request is always appreciated 😉