Skip to content

Commit 62ca5cd

Browse files
authored
Merge pull request #344 from Oksydan/bootstrap-components-dynamic-loading-fixes
Bootstrap components dynamic loading fixes
2 parents 3ac291f + 3ee07fc commit 62ca5cd

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

_dev/js/utils/dynamicImports/useBootstrapComponentDynamicImport.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,10 @@ const useBootstrapComponentDynamicImport = (importFiles, {
155155
const handleEvent = async (e) => {
156156
e.preventDefault();
157157

158+
if (filesLoaded || filesLoading) {
159+
return;
160+
}
161+
158162
await handleComponentLoad();
159163

160164
const { delegateTarget, type } = e;
@@ -253,6 +257,8 @@ const useBootstrapComponentDynamicImport = (importFiles, {
253257
jQuerySetCallbackForElement(this, jQueryCreateCallbackObject(getJQueryComponentName(), args));
254258

255259
handleComponentLoad();
260+
261+
return this;
256262
};
257263
}
258264

0 commit comments

Comments
 (0)