Skip to content

Commit

Permalink
improve the logic
Browse files Browse the repository at this point in the history
  • Loading branch information
panwaranuj01 committed Nov 24, 2024
1 parent 5e7e64e commit ef1bc98
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions webplugin/plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -358,15 +358,21 @@ function injectJquery() {
script.readyState === 'loaded' ||
script.readyState === 'complete'
) {
scriptLoader(sentryScriptToLoad).then(
addKommunicatePluginToIframe
);
scriptLoader(sentryScriptToLoad)
.then(addKommunicatePluginToIframe)
.catch(function (error) {
console.error(error);
});
}
};
} else {
// Others
script.onload = function () {
scriptLoader(sentryScriptToLoad).then(addKommunicatePluginToIframe);
scriptLoader(sentryScriptToLoad)
.then(addKommunicatePluginToIframe)
.catch(function (error) {
console.error(error);
});
};
}
script.onerror = function (error) {
Expand Down

0 comments on commit ef1bc98

Please sign in to comment.