Improves detection of not present tainaca_plugin in the thumbnail helper function.

This commit is contained in:
mateuswetah 2021-07-12 10:26:29 -03:00
parent 49c56fdaf9
commit 04112eff78
1 changed files with 1 additions and 1 deletions

View File

@ -4,7 +4,7 @@ export const ThumbnailHelperPlugin = {};
export const ThumbnailHelperFunctions = () => {
return {
imagesFolderPath() {
return tainacan_plugin ? (tainacan_plugin.base_url + '/assets/images/') : (tainacan_blocks ? (tainacan_blocks.base_url + '/assets/images/') : '/assets/images/');
return typeof tainacan_plugin != 'undefined' ? (tainacan_plugin.base_url + '/assets/images/') : (tainacan_blocks ? (tainacan_blocks.base_url + '/assets/images/') : '/assets/images/');
},
getSrc(thumbnail, tainacanSize, documentType) {
const wordpressSize = this.getWordpressFallbackSize(tainacanSize);