Skip to content

Commit

Permalink
Minor code tweaks/refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
orestbida committed Mar 30, 2023
1 parent 384e390 commit a3f099a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion dist/iframemanager.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions src/iframemanager.js
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,7 @@
* @param {servicePropObj} serviceProp
*/
const removeIframe = (serviceProp) => {
serviceProp._iframe.parentNode.removeChild(serviceProp._iframe);
serviceProp._iframe?.remove();
serviceProp._hasIframe = false;
};

Expand Down Expand Up @@ -649,9 +649,9 @@
*/
if(serviceProps[i]._hasIframe){
if(isFunction(serviceConfig.onReject)){
serviceConfig.onReject(serviceProps[i]._iframe || serviceProps[i]._div);
serviceConfig.onReject(serviceProps[i]._iframe, serviceProps[i]._div, () => showNotice(serviceProps[i]));
serviceProps[i]._hasIframe = false;
}else{
} else {
removeIframe(serviceProps[i]);
}
}
Expand Down

0 comments on commit a3f099a

Please sign in to comment.