Skip to content

Commit

Permalink
Merge pull request #602 from humphd/thimble-1762
Browse files Browse the repository at this point in the history
  • Loading branch information
humphd authored Feb 21, 2017
2 parents 34e989e + e5ebf88 commit 2888cfb
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/extensions/default/bramble/nohost/HTMLServer.js
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,15 @@ define(function (require, exports, module) {
var liveDocument = this.get(path);

function serveCSS(path, css, callback) {
// If we already have a cached Blob URL for this path, use it,
// otherwise generate a new one. This can happen if a file is included
// more than once in the same HTML file (e.g., multiple <link>s with same `src`).
var existingURL = BlobUtils.getUrl(path);
if(existingURL !== path) {
callback(null, existingURL);
return;
}

CSSRewriter.rewrite(path, css, function(err, css) {
if(err) {
callback(err);
Expand Down

0 comments on commit 2888cfb

Please sign in to comment.