Verification for nonce presence on tainacan_blocks variable.
This commit is contained in:
parent
4a9734e3b4
commit
31c97a2fe3
|
@ -4,6 +4,7 @@ const tainacan = axios.create({
|
|||
baseURL: tainacan_blocks.root
|
||||
});
|
||||
|
||||
tainacan.defaults.headers.common['X-WP-Nonce'] = tainacan_blocks.nonce;
|
||||
if (tainacan_blocks.nonce)
|
||||
tainacan.defaults.headers.common['X-WP-Nonce'] = tainacan_blocks.nonce;
|
||||
|
||||
export default tainacan;
|
Loading…
Reference in New Issue