fix #2456
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import win from "core/window"
|
||||
import btoa from "btoa"
|
||||
import { btoa } from "core/utils"
|
||||
|
||||
export const SHOW_AUTH_POPUP = "show_popup"
|
||||
export const AUTHORIZE = "authorize"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { fromJS, Map } from "immutable"
|
||||
import btoa from "btoa"
|
||||
import { btoa } from "core/utils"
|
||||
|
||||
import {
|
||||
SHOW_AUTH_POPUP,
|
||||
|
||||
@@ -547,3 +547,15 @@ export const parseSeach = () => {
|
||||
|
||||
return map
|
||||
}
|
||||
|
||||
export const btoa = (str) => {
|
||||
let buffer;
|
||||
|
||||
if (str instanceof Buffer) {
|
||||
buffer = str;
|
||||
} else {
|
||||
buffer = new Buffer(str.toString(), "utf-8");
|
||||
}
|
||||
|
||||
return buffer.toString("base64");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user