Skip to content

Commit

Permalink
build: version
Browse files Browse the repository at this point in the history
  • Loading branch information
peng committed Aug 28, 2024
1 parent 9039a95 commit f050cf4
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "jsonp-pro",
"version": "1.1.1",
"version": "1.1.2",
"description": "ajax jsonp methods",
"main": "./src/jsonp.cjs.js",
"module": "./dist/jsonp.esm.js",
Expand Down
4 changes: 2 additions & 2 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ export default function(url, options) {
function timeout() {
function outTime() {
// script.parentNode.removeChild(script);
removeChild(script.parentNode, script)
removeChild(script.parentNode, script);
window.hasOwnProperty(callbackName) && delete window[callbackName];
clearTimeout(timer);
options.timeout();
Expand Down Expand Up @@ -153,7 +153,7 @@ export default function(url, options) {
loaded && loaded();
clearTimeout(timer);
// oHead.removeChild(script);
removeChild(oHead, script)
removeChild(oHead, script);
}

script.addEventListener('load', loadLis);
Expand Down
4 changes: 2 additions & 2 deletions src/methods.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@ export function randNum() {
}

export function removeChild(parent, child) {
const { childNodes } = parent
const { childNodes } = parent;

for (let i = 0; i < childNodes.length; i++) {
if (childNodes[i] === child) {
parent.removeChild(child)
parent.removeChild(child);
}
}
}

0 comments on commit f050cf4

Please sign in to comment.