Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix issue when bootstrap is not fully imported #12

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

PastisD
Copy link

@PastisD PastisD commented Feb 15, 2022

Hello,

When each bootstrap module is imported individually, for exemple, import {Alert, Collapse, Dropdown} from 'bootstrap' in your application, an error occured using Bs5Utils : Uncaught ReferenceError: bootstrap is not defined

In the case of Modal, instead of using const bsModal = new bootstrap.Modal(modal, opts); we now use bootsrap module :

import {Modal as ModalBs} from "bootstrap";

const bsModal = new ModalBs(modal, opts);

With this fix, the error doesn't occur anymore for Modal, Toast and Snack.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant