summaryrefslogtreecommitdiff
path: root/op_crates/file/lib.rs
diff options
context:
space:
mode:
Diffstat (limited to 'op_crates/file/lib.rs')
-rw-r--r--op_crates/file/lib.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/op_crates/file/lib.rs b/op_crates/file/lib.rs
index e8c2cde1d..ea519046f 100644
--- a/op_crates/file/lib.rs
+++ b/op_crates/file/lib.rs
@@ -24,9 +24,10 @@ pub struct Location(pub Url);
pub struct BlobUrlStore(Arc<Mutex<HashMap<Url, Blob>>>);
impl BlobUrlStore {
- pub fn get(&self, url: &ModuleSpecifier) -> Result<Option<Blob>, AnyError> {
+ pub fn get(&self, mut url: Url) -> Result<Option<Blob>, AnyError> {
let blob_store = self.0.lock().unwrap();
- Ok(blob_store.get(url).cloned())
+ url.set_fragment(None);
+ Ok(blob_store.get(&url).cloned())
}
pub fn insert(&self, blob: Blob, maybe_location: Option<Url>) -> Url {