Safety check if nonces exist to initialize media frames.

This commit is contained in:
mateuswetah 2020-10-22 18:03:18 -03:00
parent d1404a3178
commit 52caa430e0
1 changed files with 1 additions and 1 deletions

View File

@ -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: () => {