Skip to content

Commit

Permalink
add comment about url replacing
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex Fedosov committed Jun 1, 2015
1 parent bd8e9f6 commit 9f49fe6
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions private/loader.js
Expand Up @@ -132,9 +132,14 @@
success: function (data) {
var head = document.getElementsByTagName('head')[0];

// Replace urls in CSS in case local config was changed
// after build. originalBaseUrl contains URL value at the
// moment application was built. baseUrl contains current
// value.
var originalBaseUrl = '__ORIGINAL_BASE_URL__';
var baseURL = DG.config.protocol + DG.config.baseUrl;

// Replace if they don't match
if (baseURL !== originalBaseUrl) {
data = data.replace(
new RegExp(originalBaseUrl, 'g'),
Expand Down

0 comments on commit 9f49fe6

Please sign in to comment.