diff --git a/modules/ve-mw/ui/dialogs/ve.ui.MWMediaDialog.js b/modules/ve-mw/ui/dialogs/ve.ui.MWMediaDialog.js index 6902780891..d13e66e9fd 100644 --- a/modules/ve-mw/ui/dialogs/ve.ui.MWMediaDialog.js +++ b/modules/ve-mw/ui/dialogs/ve.ui.MWMediaDialog.js @@ -1189,7 +1189,7 @@ ve.ui.MWMediaDialog.prototype.getSetupProcess = function ( data ) { this.actions.setAbilities( { upload: false, save: false, insert: false, done: false } ); this.mediaUploadBookletInit = false; - if ( data.file ) { + if ( data.file && this.mediaUploadBooklet ) { this.searchTabs.setTabPanel( 'upload' ); this.mediaUploadBooklet.setFile( data.file ); }