mirror of
https://github.com/mozilla/pdf.js.git
synced 2026-06-02 00:01:01 +02:00
Merge pull request #21158 from Snuffleupagus/modifiedIds-proper-hash
Compute a "proper" hash in the `AnnotationStorage.prototype.modifiedIds` getter
This commit is contained in:
commit
0d7439e856
@ -303,9 +303,15 @@ class AnnotationStorage {
|
||||
ids.push(value.annotationElementId);
|
||||
}
|
||||
}
|
||||
let hash = "";
|
||||
if (ids.length) {
|
||||
const h = new MurmurHash3_64();
|
||||
h.update(ids.join(","));
|
||||
hash = h.hexdigest();
|
||||
}
|
||||
return (this.#modifiedIds = {
|
||||
ids: new Set(ids),
|
||||
hash: ids.join(","),
|
||||
hash,
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user