Only use a bare URL when the link text field is used.

Fixes bug that would remove images on edit, in some circumstances.

fixes #33293
props azaozz

git-svn-id: https://develop.svn.wordpress.org/trunk@33591 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Mark Jaquith 2015-08-06 20:57:31 +00:00
parent 3d15757198
commit 7e4a72b9bc

View File

@ -365,7 +365,10 @@ var wpLink;
}
link = getLink();
text = inputs.text.val() || attrs.href;
if ( inputs.wrap.hasClass( 'has-text-field' ) ) {
text = inputs.text.val() || attrs.href;
}
if ( link ) {
if ( text ) {