Skip to content

Commit 4515edd

Browse files
tech4him1erquhart
authored andcommitted
Use cached images for new uploads (#925)
1 parent 6fca83c commit 4515edd

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/valueObjects/AssetProxy.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@ export default function AssetProxy(value, fileObj, uploaded = false, asset) {
2020
}
2121

2222
AssetProxy.prototype.toString = function () {
23-
if (this.uploaded) return this.public_path;
23+
// Use the deployed image path if we do not have a locally cached copy.
24+
if (this.uploaded && !this.fileObj) return this.public_path;
2425
try {
2526
return window.URL.createObjectURL(this.fileObj);
2627
} catch (error) {

0 commit comments

Comments
 (0)