diff --git a/static/js/Wiki.js b/static/js/Wiki.js index 598d838..e18b972 100644 --- a/static/js/Wiki.js +++ b/static/js/Wiki.js @@ -1312,7 +1312,7 @@ Wiki.prototype.connect_image_button = function ( button, filename_prefix ) { Wiki.prototype.down_image_button = function ( name ) { var button = getElement( name ); - if ( !button ) + if ( !button || !button.filename_preifx ) return; var toolbar_image_dir = this.get_toolbar_image_dir( button.always_small ); @@ -1328,7 +1328,7 @@ Wiki.prototype.down_image_button = function ( name ) { Wiki.prototype.up_image_button = function ( name ) { var button = getElement( name ); - if ( !button ) + if ( !button || !button.filename_prefix ) return; var toolbar_image_dir = this.get_toolbar_image_dir( button.always_small ); @@ -1344,7 +1344,7 @@ Wiki.prototype.up_image_button = function ( name ) { Wiki.prototype.toggle_image_button = function ( name ) { var button = getElement( name ); - if ( !button ) + if ( !button || !button.filename_prefix ) return; var toolbar_image_dir = this.get_toolbar_image_dir( button.always_small );