Safety check if nonces exist to initialize media frames.
This commit is contained in:
parent
d1404a3178
commit
52caa430e0
|
@ -1412,7 +1412,7 @@ export default {
|
|||
frame_title: this.$i18n.get('instruction_select_files_to_attach_to_item'),
|
||||
frame_button: this.$i18n.get('label_attach_to_item'),
|
||||
},
|
||||
nonce: this.item.nonces['update-post_' + this.item.id],
|
||||
nonce: this.item.nonce ? this.item.nonces['update-post_' + this.item.id] : null,
|
||||
relatedPostId: this.itemId,
|
||||
document: this.item.document_type == 'attachment' ? this.item.document : null,
|
||||
onSave: () => {
|
||||
|
|
Loading…
Reference in New Issue