Skip to content

Commit

Permalink
Fixed urls with query strings.
Browse files Browse the repository at this point in the history
In a previous change, urls with query strings were broken such that
if one contained a /, it caused the demo page to fail to load.
Therefore, legacy custom URLs from before we added URL fragments which
contain asset or license URIs stopped working.
This change accounts for that.

Fixes: 71509895

Change-Id: I9e631a83fc7a551e841419dd4bec2885a2fd0a07
  • Loading branch information
theodab committed Jan 3, 2018
1 parent 6c89a36 commit 21475cf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions demo/load.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@
* mode during development.
*/
(function() { // anonymous namespace
// The URL of the page itself, without URL fragments.
var pageUrl = location.href.split('#')[0];
// The URL of the page itself, without URL fragments or search strings.
var pageUrl = location.href.split('#')[0].split('?')[0];
// The URL of the page, up to and including the final '/'.
var baseUrl = pageUrl.split('/').slice(0, -1).join('/') + '/';

Expand Down

0 comments on commit 21475cf

Please sign in to comment.