Ensure that wp.media.view.settings.post is set before accessing the post's id

Avoids JS error in cases where media-editor is loaded individually
instead of with the whole `wp_enqueue_media()` process.

fixes #27836. props nacin

git-svn-id: https://develop.svn.wordpress.org/trunk@28149 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Mark Jaquith 2014-04-16 15:25:35 +00:00
parent 43d194c3b6
commit e05574bcf9

View File

@ -535,7 +535,7 @@
link: 'post',
size: 'thumbnail',
order: 'ASC',
id: wp.media.view.settings.post.id,
id: wp.media.view.settings.post && wp.media.view.settings.post.id,
orderby : 'menu_order ID'
}
});