File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -253,13 +253,11 @@ define([
253253 if ( ! checking ) {
254254 return ;
255255 }
256- if ( msg . content [ 'name' ] == 'stderr' ) {
257- if ( msg . content [ 'text' ] . includes ( 'not found' ) ) {
258- $ ( that . wrapSelector ( '.' + VP_PF_INSTALL_BTN ) ) . text ( 'Install' ) ;
259- // set enabled
260- if ( $ ( that . wrapSelector ( '.' + VP_PF_INSTALL_BTN ) ) . hasClass ( 'disabled' ) ) {
261- $ ( that . wrapSelector ( '.' + VP_PF_INSTALL_BTN ) ) . removeClass ( 'disabled' ) ;
262- }
256+ if ( msg . content [ 'name' ] == 'stderr' || msg . content [ 'text' ] . includes ( 'not found' ) ) {
257+ $ ( that . wrapSelector ( '.' + VP_PF_INSTALL_BTN ) ) . text ( 'Install' ) ;
258+ // set enabled
259+ if ( $ ( that . wrapSelector ( '.' + VP_PF_INSTALL_BTN ) ) . hasClass ( 'disabled' ) ) {
260+ $ ( that . wrapSelector ( '.' + VP_PF_INSTALL_BTN ) ) . removeClass ( 'disabled' ) ;
263261 }
264262 } else {
265263 $ ( that . wrapSelector ( '.' + VP_PF_INSTALL_BTN ) ) . text ( 'Installed' ) ;
@@ -351,7 +349,7 @@ define([
351349 } ) ;
352350
353351 // click install
354- $ ( document ) . on ( 'click' , this . wrapSelector ( '.' + VP_PF_INSTALL_BTN ) , function ( event ) {
352+ $ ( document ) . on ( 'click' , this . wrapSelector ( '.' + VP_PF_INSTALL_BTN + ':not(.disabled)' ) , function ( event ) {
355353 vpCommon . cellExecute ( [ { command : '!pip install pandas-profiling' , exec :true , type :'code' } ] ) ;
356354 } ) ;
357355
You can’t perform that action at this time.
0 commit comments