bump
parent
6ce97228a7
commit
6ef82540a5
|
@ -76,7 +76,9 @@ function jsonp(url, options) {
|
||||||
cleanup();
|
cleanup();
|
||||||
resolve(data);
|
resolve(data);
|
||||||
};
|
};
|
||||||
params[callback] = id;
|
if (!callbackName) {
|
||||||
|
params[callback] = id;
|
||||||
|
}
|
||||||
url = handleUrl(url, params);
|
url = handleUrl(url, params);
|
||||||
// Create script.
|
// Create script.
|
||||||
script = document.createElement('script');
|
script = document.createElement('script');
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "simple-jsonp-promise",
|
"name": "simple-jsonp-promise",
|
||||||
"version": "1.0.9",
|
"version": "1.1.0",
|
||||||
"description": "",
|
"description": "",
|
||||||
"main": "build/index.js",
|
"main": "build/index.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|
|
@ -26,7 +26,7 @@ function jsonp(url, options) {
|
||||||
let timer;
|
let timer;
|
||||||
let promise;
|
let promise;
|
||||||
// Generate a unique id for the request.
|
// Generate a unique id for the request.
|
||||||
let id = callbackName || (prefix + (count++));
|
let id = callbackName || prefix + count++;
|
||||||
|
|
||||||
function noop() {}
|
function noop() {}
|
||||||
|
|
||||||
|
@ -69,7 +69,9 @@ function jsonp(url, options) {
|
||||||
cleanup();
|
cleanup();
|
||||||
resolve(data);
|
resolve(data);
|
||||||
};
|
};
|
||||||
params[callback] = id;
|
if (!callbackName) {
|
||||||
|
params[callback] = id;
|
||||||
|
}
|
||||||
url = handleUrl(url, params);
|
url = handleUrl(url, params);
|
||||||
// Create script.
|
// Create script.
|
||||||
script = document.createElement('script');
|
script = document.createElement('script');
|
||||||
|
|
Loading…
Reference in New Issue