Index: src/js/_enqueues/wp/media/editor.js
===================================================================
--- src/js/_enqueues/wp/media/editor.js	(revision 46992)
+++ src/js/_enqueues/wp/media/editor.js	(working copy)
@@ -164,8 +164,9 @@
 			var shortcode, html, extension;
 
 			props = wp.media.string.props( props, attachment );
-			if ( props.link !== 'embed' )
+			if ( props.link !== 'embed' ) {
 				return wp.media.string.link( props );
+			}
 
 			shortcode = {};
 
@@ -444,7 +445,7 @@
 
 				if ( attrs._orderbyRandom ) {
 					attrs.orderby = 'rand';
-				} else if ( attrs._orderByField && attrs._orderByField != 'rand' ) {
+				} else if ( attrs._orderByField && attrs._orderByField !== 'rand' ) {
 					attrs.orderby = attrs._orderByField;
 				}
 
