Fixes typo when passing nonce to attachments control.

This commit is contained in:
mateuswetah 2020-10-30 10:01:11 -03:00
parent 594e3d1e49
commit 7b701cc96b
1 changed files with 1 additions and 2 deletions

View File

@ -1405,14 +1405,13 @@ export default {
}
}
);
this.attachmentMediaFrame = new wpMediaFrames.attachmentControl(
'my-attachment-media-frame', {
button_labels: {
frame_title: this.$i18n.get('instruction_select_files_to_attach_to_item'),
frame_button: this.$i18n.get('label_attach_to_item'),
},
nonce: this.item.nonce ? this.item.nonces['update-post_' + this.item.id] : null,
nonce: this.item.nonces ? this.item.nonces['update-post_' + this.item.id] : null,
relatedPostId: this.itemId,
document: this.item.document_type == 'attachment' ? this.item.document : null,
onSave: () => {