Media: Reset aspect ratio constraints when width and height fields fail numeric validation.

Props TBschen, valentinbora.
Fixes #49073.


git-svn-id: https://develop.svn.wordpress.org/trunk@47262 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Anthony Burchell 2020-02-11 04:38:55 +00:00
parent 886a02686b
commit 08b3c1d123

View File

@ -1113,6 +1113,10 @@
h = $('#image-preview-' + postid).height();
if ( false === this.validateNumeric( el ) ) {
this.iasapi.setOptions({
aspectRatio: null
});
return;
}