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