@capillarytech/creatives-library 7.17.54 → 7.17.56

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@capillarytech/creatives-library",
3
3
  "author": "meharaj",
4
- "version": "7.17.54",
4
+ "version": "7.17.56",
5
5
  "description": "Capillary creatives ui",
6
6
  "main": "./index.js",
7
7
  "module": "./index.es.js",
@@ -666,17 +666,18 @@ export class Templates extends React.Component { // eslint-disable-line react/pr
666
666
  this.setState({ selectedAccountError: false });
667
667
  }
668
668
  } else if ([LINE.toLowerCase(), RCS_LOWERCASE, ZALO_LOWERCASE].includes(selectedChannel)) {
669
- const setAcc = this.props.Templates.weCrmAccounts.find((item) => item.name === this.state.selectedAccount);
669
+ const setAcc = this.props?.Templates?.weCrmAccounts?.find((item) => item?.name === this.state.selectedAccount);
670
670
  this.props.actions.setChannelAccount(selectedChannel?.toUpperCase(), setAcc);
671
671
  if(selectedChannel === ZALO_LOWERCASE){
672
672
  const {
673
673
  name = "",
674
674
  sourceAccountIdentifier = "",
675
675
  configs: { token = "" } = {},
676
- } = setAcc;
676
+ } = setAcc || {};
677
677
  params.username = name;
678
678
  params.oa_id = sourceAccountIdentifier;
679
- params.token = token;
679
+ params.token = token;
680
+ params.isAccountSelection = true;
680
681
  }
681
682
  }
682
683
 
@@ -820,7 +821,8 @@ export class Templates extends React.Component { // eslint-disable-line react/pr
820
821
  }
821
822
  if (
822
823
  this.state.channel.toLowerCase() === ZALO_LOWERCASE &&
823
- !isEmpty(this.props.Templates?.selectedZaloAccount)
824
+ !isEmpty(this.props.Templates?.selectedZaloAccount) &&
825
+ !params?.isAccountSelection
824
826
  ) {
825
827
  const {
826
828
  name = "",