@subiz/widget-v4 4.1.5 → 4.1.7

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.
@@ -35,7 +35,7 @@ class Header extends _common.Com {
35
35
  }
36
36
  renderCollapsedHeader(show) {
37
37
  let accSetting = this.props.plugin.chatbox || {};
38
- let acc = this.props.store.matchAccount();
38
+ let acc = this.props.store.matchAccount() || {};
39
39
  let state = acc.is_online ? this.props.t('agent_online') : this.props.t('agent_offline');
40
40
  let tagline = _index.default.get(accSetting, `tagline`, {});
41
41
  let desc = this.props.t.i18n(tagline) || accSetting.introduction || state;
@@ -60,7 +60,7 @@ class Header extends _common.Com {
60
60
  }
61
61
  renderSocial(show) {
62
62
  let accSetting = this.props.plugin.chatbox || {};
63
- let acc = this.props.store.matchAccount();
63
+ let acc = this.props.store.matchAccount() || {};
64
64
  let links = _index.default.get(accSetting, 'header.links') || [];
65
65
  let $links = _index.default.map(links, link => {
66
66
  if (!link.url || !link.type || link.type === 'subiz') return null;
@@ -151,7 +151,7 @@ Vui lòng hỏi chúng tôi bất cứ điều gì hoặc chia sẻ phản hồi
151
151
  }
152
152
  getTitle() {
153
153
  let accSetting = this.props.plugin.chatbox || {};
154
- let acc = this.props.store.matchAccount();
154
+ let acc = this.props.store.matchAccount() || {};
155
155
  let agentsJoined = this.getAgentJoined(this.props.cid);
156
156
  let caption = _index.default.get(this.props.plugin, 'chatbox.caption', {});
157
157
  let title = this.props.t.i18n(caption) || accSetting.title;
@@ -85,7 +85,7 @@ class _default {
85
85
  this.mask = obj.mask;
86
86
  this.uid = obj.uid;
87
87
  return {
88
- account_id: accid,
88
+ account_id: this.accid,
89
89
  id: 'usqzgtgfake'
90
90
  };
91
91
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@subiz/widget-v4",
3
- "version": "4.1.5",
3
+ "version": "4.1.7",
4
4
  "main": "./compiled_src/lib.js",
5
5
  "scripts": {
6
6
  "dev": "npx webpack serve --config webpack.dev.js",
@@ -40,7 +40,7 @@ export default class Header extends Com {
40
40
 
41
41
  renderCollapsedHeader(show) {
42
42
  let accSetting = this.props.plugin.chatbox || {}
43
- let acc = this.props.store.matchAccount()
43
+ let acc = this.props.store.matchAccount() || {}
44
44
  let state = acc.is_online ? this.props.t('agent_online') : this.props.t('agent_offline')
45
45
  let tagline = sb.get(accSetting, `tagline`, {})
46
46
  let desc = this.props.t.i18n(tagline) || accSetting.introduction || state
@@ -65,7 +65,7 @@ export default class Header extends Com {
65
65
 
66
66
  renderSocial(show) {
67
67
  let accSetting = this.props.plugin.chatbox || {}
68
- let acc = this.props.store.matchAccount()
68
+ let acc = this.props.store.matchAccount() || {}
69
69
  let links = sb.get(accSetting, 'header.links') || []
70
70
  let $links = sb.map(links, (link) => {
71
71
  if (!link.url || !link.type || link.type === 'subiz') return null
@@ -158,10 +158,8 @@ Vui lòng hỏi chúng tôi bất cứ điều gì hoặc chia sẻ phản hồi
158
158
 
159
159
  getTitle() {
160
160
  let accSetting = this.props.plugin.chatbox || {}
161
- let acc = this.props.store.matchAccount()
162
-
161
+ let acc = this.props.store.matchAccount() || {}
163
162
  let agentsJoined = this.getAgentJoined(this.props.cid)
164
-
165
163
  let caption = sb.get(this.props.plugin, 'chatbox.caption', {})
166
164
  let title = this.props.t.i18n(caption) || accSetting.title
167
165
  return getJoinedNameMember(agentsJoined) || title || acc.name || this.props.t('widget_title')
@@ -32,7 +32,7 @@ export default class {
32
32
  this.accid = obj.accid
33
33
  this.mask = obj.mask
34
34
  this.uid = obj.uid
35
- return {account_id: accid, id: 'usqzgtgfake'}
35
+ return {account_id: this.accid, id: 'usqzgtgfake'}
36
36
  }
37
37
 
38
38
  listConversations = (_) => {