File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
phpmyfaq/admin/assets/src/content Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change 1515
1616import { createGlossary , deleteGlossary , getGlossary , updateGlossary } from '../api' ;
1717import { addElement , pushNotification } from '../../../../assets/src/utils' ;
18- import bootstrap , { Modal } from 'bootstrap' ;
18+ import { Modal } from 'bootstrap' ;
1919
2020export const handleDeleteGlossary = ( ) : void => {
2121 const deleteButtons : NodeListOf < HTMLButtonElement > = document . querySelectorAll ( '.pmf-admin-delete-glossary' ) ;
@@ -58,8 +58,8 @@ export const handleAddGlossary = (): void => {
5858 if ( response ) {
5959 if ( modal ) {
6060 // Close modal properly using Bootstrap
61- const bootstrapModal = bootstrap . Modal . getInstance ( modal ) as Modal ;
62- bootstrapModal . hide ( ) ;
61+ const bootstrapModal = Modal . getInstance ( modal ) ;
62+ bootstrapModal ? .hide ( ) ;
6363
6464 // Reset form fields for the next entry
6565 ( document . getElementById ( 'item' ) as HTMLInputElement ) . value = '' ;
@@ -148,8 +148,8 @@ export const handleUpdateGlossary = (): void => {
148148 if ( response ) {
149149 if ( modal ) {
150150 // Close modal properly using Bootstrap
151- const bootstrapModal = bootstrap . Modal . getInstance ( modal ) as Modal ;
152- bootstrapModal . hide ( ) ;
151+ const bootstrapModal = Modal . getInstance ( modal ) ;
152+ bootstrapModal ? .hide ( ) ;
153153 }
154154
155155 const itemLink = document . querySelector (
You can’t perform that action at this time.
0 commit comments