File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed
Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -54,24 +54,26 @@ function installExtension(extName: string, displayName: string) {
5454}
5555
5656$ ( "div[ext] > a" ) . click ( function ( ) {
57- installExtension ( $ ( this . parentElement ) . attr ( "ext" ) || "" , $ ( this . parentElement ) . attr ( "displayName" ) || "" ) ;
57+ if ( this . parentElement ) {
58+ installExtension ( $ ( this . parentElement ) . attr ( "ext" ) || "" , $ ( this . parentElement ) . attr ( "displayName" ) || "" ) ;
59+ }
5860} ) ;
5961
6062$ ( "a[command]" ) . click ( function ( event ) {
6163 event . stopPropagation ( ) ;
6264
6365 const command = $ ( this ) . attr ( "command" ) || "" ;
64- const args = $ ( this ) . attr ( "args" ) || null ;
66+ const args = $ ( this ) . attr ( "args" ) || undefined ;
6567 execCommand ( command , args ) ;
6668} ) ;
6769
6870$ ( "button[command]" ) . click ( function ( ) {
6971 const command = $ ( this ) . attr ( "command" ) || "" ;
70- const args = $ ( this ) . attr ( "args" ) || null ;
72+ const args = $ ( this ) . attr ( "args" ) || undefined ;
7173 execCommand ( command , args ) ;
7274} ) ;
7375
74- function execCommand ( command : string , jsonArgs : string ) {
76+ function execCommand ( command : string , jsonArgs : string | undefined ) {
7577 if ( command ) {
7678 let args = [ ] ;
7779 if ( jsonArgs ) {
You can’t perform that action at this time.
0 commit comments