Skip to content

Commit

Permalink
Merge pull request #152 from K-LV/blobUtilsReturn
Browse files Browse the repository at this point in the history
return parameter if file not cached
  • Loading branch information
gideonthomas committed Mar 30, 2015
2 parents 2bc0b10 + c2209bc commit 98f8622
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/filesystem/impls/filer/BlobUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ define(function (require, exports, module) {
"use strict";

var Handlers = require("filesystem/impls/lib/handlers");
var Log = require("filesystem/impls/lib/log");

// BlobUtils provides an opportunistic cache for BLOB Object URLs
// which can be looked-up synchronously.
Expand Down Expand Up @@ -65,9 +64,10 @@ define(function (require, exports, module) {

var url = blobURLs[filename];

// We expect this to exist, if it doesn't, warn.
// We expect this to exist, if it doesn't,
// return path back unchanged
if(!url) {
Log.error("no blob URL for `" + filename + "`.");
return filename;
}

return url;
Expand All @@ -77,9 +77,10 @@ define(function (require, exports, module) {
function getFilename(blobUrl) {
var filename = paths[blobUrl];

// We expect this to exist, if it doesn't, warn.
// We expect this to exist, if it doesn't,
// return path back unchanged
if(!filename) {
Log.error("no path for `" + blobUrl + "`.");
return blobUrl;
}

return filename;
Expand Down

0 comments on commit 98f8622

Please sign in to comment.