提交 4fa07aea 编写于 作者: 卜木 提交者: 花裤衩

Update index.js

上级 56a04886
......@@ -110,11 +110,10 @@
export function param2Obj(url) {
const search = url.split('?')[1];
if (search !== undefined) {
return JSON.parse('{"' + decodeURIComponent(search).replace(/"/g, '\\"').replace(/&/g, '","').replace(/=/g, '":"') + '"}');
if (!search) {
return {}
}
return {};
return JSON.parse('{"' + decodeURIComponent(search).replace(/"/g, '\\"').replace(/&/g, '","').replace(/=/g, '":"') + '"}');
}
export function html2Text(val) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册