Fix replace handling.
This commit is contained in:
parent
a817ccdcb9
commit
50851064e7
@ -32,8 +32,7 @@ const PACK = {
|
||||
str += String.fromCharCode(bytes[i]);
|
||||
}
|
||||
let enc = window.btoa(str);
|
||||
enc.replace("/", "-");
|
||||
return enc;
|
||||
return enc.replace("/", "-");
|
||||
},
|
||||
};
|
||||
|
||||
@ -131,7 +130,7 @@ const UNPACK = {
|
||||
return str;
|
||||
},
|
||||
base64(data) {
|
||||
data.replace("-", "/");
|
||||
data = data.replace("-", "/");
|
||||
let str = window.atob(data);
|
||||
let bytes = new Uint8Array(str.length);
|
||||
for(let i = 0; i < bytes.length; ++i) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user