Skip to content

Commit

Permalink
Replace all occurances not just first
Browse files Browse the repository at this point in the history
  • Loading branch information
singpolyma committed Oct 11, 2024
1 parent a4a243c commit 16a4fb0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion snikket/persistence/browser.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ const browser = (dbname, tokenize, stemmer) => {
caches.open(dbname).then((c) => cache = c);

function mkNiUrl(hashAlgorithm, hashBytes) {
const b64url = btoa(Array.from(new Uint8Array(hashBytes), (x) => String.fromCodePoint(x)).join("")).replace(/\+/, "-").replace(/\//, "_").replace(/=/, "");
const b64url = btoa(Array.from(new Uint8Array(hashBytes), (x) => String.fromCodePoint(x)).join("")).replace(/\+/g, "-").replace(/\//g, "_").replace(/=/g, "");
return "/.well-known/ni/" + hashAlgorithm + "/" + b64url;
}

Expand Down

0 comments on commit 16a4fb0

Please sign in to comment.