[fix] param serialization
parent
dc27282ed7
commit
786e0bf7ec
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "simple-jsonp-promise",
|
"name": "simple-jsonp-promise",
|
||||||
"version": "1.0.5",
|
"version": "1.0.6",
|
||||||
"description": "",
|
"description": "",
|
||||||
"main": "build/index.js",
|
"main": "build/index.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|
|
@ -39,7 +39,7 @@ function jsonp( url, options ) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function serialize( params ) {
|
function serialize( params ) {
|
||||||
let param = '';
|
let param = '?';
|
||||||
for ( let key in params ) {
|
for ( let key in params ) {
|
||||||
if ( params.hasOwnProperty( key ) ) {
|
if ( params.hasOwnProperty( key ) ) {
|
||||||
param += `&${key}=${encodeURIComponent( params[ key ] )}`;
|
param += `&${key}=${encodeURIComponent( params[ key ] )}`;
|
||||||
|
|
Loading…
Reference in New Issue