Skip to content
This repository has been archived by the owner on Aug 24, 2018. It is now read-only.

Commit

Permalink
Check error code instead of presence of non-existent error.missing_at…
Browse files Browse the repository at this point in the history
…tachment prop
  • Loading branch information
westonruter committed Mar 20, 2017
1 parent 7f32d28 commit ac1239a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion wp-includes/widgets/class-wp-widget-image.php
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ public function render_control_template_scripts() {

?>
<script type="text/html" id="tmpl-wp-media-widget-image-preview">
<# if ( data.attachment.error && data.attachment.error.missing_attachment ) { #>
<# if ( data.attachment.error && 'missing_attachment' === data.attachment.error ) { #>
<div class="notice notice-error notice-alt notice-missing-attachment">
<p><?php echo $this->l10n['missing_attachment']; ?></p>
</div>
Expand Down

0 comments on commit ac1239a

Please sign in to comment.