File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -30,7 +30,8 @@ export async function initCitationFileCopyContent() {
3030 const citationCopyApa = document . querySelector < HTMLButtonElement > ( '#citation-copy-apa' ) ;
3131 const citationCopyBibtex = document . querySelector < HTMLButtonElement > ( '#citation-copy-bibtex' ) ;
3232 const inputContent = document . querySelector < HTMLInputElement > ( '#citation-copy-content' ) ;
33- const modal = fomanticQuery ( '#cite-repo-modal' ) ;
33+ const elModal = document . querySelector < HTMLElement > ( '#cite-repo-modal' ) ;
34+ const $modal = fomanticQuery ( '#cite-repo-modal' ) ;
3435
3536 if ( ( ! citationCopyApa && ! citationCopyBibtex ) || ! inputContent ) return ;
3637
@@ -43,8 +44,8 @@ export async function initCitationFileCopyContent() {
4344 } ;
4445
4546 document . querySelector ( '#cite-repo-button' ) ?. addEventListener ( 'click' , async ( ) => {
46- modal . modal ( 'show' ) ;
47- modal . addClass ( 'is-loading' ) ;
47+ $ modal. modal ( 'show' ) ;
48+ elModal . classList . add ( 'is-loading' ) ;
4849
4950 try {
5051 try {
@@ -69,7 +70,7 @@ export async function initCitationFileCopyContent() {
6970 inputContent . select ( ) ;
7071 } ) ;
7172 } finally {
72- modal . removeClass ( 'is-loading' ) ;
73+ elModal . classList . remove ( 'is-loading' ) ;
7374 }
7475 } ) ;
7576}
You can’t perform that action at this time.
0 commit comments