Media: Fix JavaScript TypeError after [45376].

Props desrosj, afercia.
Fixes #48021.


git-svn-id: https://develop.svn.wordpress.org/trunk@46321 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrea Fercia 2019-09-26 13:05:19 +00:00
parent da43c14a5d
commit 8c8999d933
1 changed files with 3 additions and 1 deletions

View File

@ -128,7 +128,9 @@ UploaderStatus = View.extend(/** @lends wp.media.view.UploaderStatus.prototype *
}
wp.Uploader.errors.reset();
// Move focus to the modal after the dismiss button gets removed from the DOM.
this.controller.modal.focusManager.focus();
if ( this.controller.modal ) {
this.controller.modal.focusManager.focus();
}
}
});