@verdocs/web-sdk 4.2.76 → 4.2.78

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.
@@ -99,7 +99,7 @@ const VerdocsAuth = class {
99
99
  this.submitting = false;
100
100
  (_a = this.authenticated) === null || _a === void 0 ? void 0 : _a.emit({ authenticated: false, profile: null, session: null });
101
101
  (_b = this.sdkError) === null || _b === void 0 ? void 0 : _b.emit(new errors.SDKError(e.message, (_c = e.response) === null || _c === void 0 ? void 0 : _c.status, (_d = e.response) === null || _d === void 0 ? void 0 : _d.data));
102
- Toast.VerdocsToast('Signup failed: ' + ((_f = (_e = e.response) === null || _e === void 0 ? void 0 : _e.data) === null || _f === void 0 ? void 0 : _f.message) || 'Unknown Error', { style: 'error' });
102
+ Toast.VerdocsToast('Signup failed: ' + ((_f = (_e = e.response) === null || _e === void 0 ? void 0 : _e.data) === null || _f === void 0 ? void 0 : _f.error) || 'Unknown Error', { style: 'error' });
103
103
  });
104
104
  }
105
105
  async handleVerification() {
@@ -132,6 +132,9 @@ const VerdocsSend = class {
132
132
  var _a, _b, _c;
133
133
  try {
134
134
  this.endpoint.onSessionChanged((_endpoint, _session, profile) => {
135
+ if (!profile) {
136
+ return;
137
+ }
135
138
  const me = {
136
139
  id: profile.id,
137
140
  first_name: profile.first_name,
@@ -113,7 +113,7 @@ export class VerdocsAuth {
113
113
  this.submitting = false;
114
114
  (_a = this.authenticated) === null || _a === void 0 ? void 0 : _a.emit({ authenticated: false, profile: null, session: null });
115
115
  (_b = this.sdkError) === null || _b === void 0 ? void 0 : _b.emit(new SDKError(e.message, (_c = e.response) === null || _c === void 0 ? void 0 : _c.status, (_d = e.response) === null || _d === void 0 ? void 0 : _d.data));
116
- VerdocsToast('Signup failed: ' + ((_f = (_e = e.response) === null || _e === void 0 ? void 0 : _e.data) === null || _f === void 0 ? void 0 : _f.message) || 'Unknown Error', { style: 'error' });
116
+ VerdocsToast('Signup failed: ' + ((_f = (_e = e.response) === null || _e === void 0 ? void 0 : _e.data) === null || _f === void 0 ? void 0 : _f.error) || 'Unknown Error', { style: 'error' });
117
117
  });
118
118
  }
119
119
  async handleVerification() {
@@ -48,6 +48,9 @@ export class VerdocsSend {
48
48
  var _a, _b, _c;
49
49
  try {
50
50
  this.endpoint.onSessionChanged((_endpoint, _session, profile) => {
51
+ if (!profile) {
52
+ return;
53
+ }
51
54
  const me = {
52
55
  id: profile.id,
53
56
  first_name: profile.first_name,
@@ -99,7 +99,7 @@ const VerdocsAuth$1 = /*@__PURE__*/ proxyCustomElement(class VerdocsAuth extends
99
99
  this.submitting = false;
100
100
  (_a = this.authenticated) === null || _a === void 0 ? void 0 : _a.emit({ authenticated: false, profile: null, session: null });
101
101
  (_b = this.sdkError) === null || _b === void 0 ? void 0 : _b.emit(new SDKError(e.message, (_c = e.response) === null || _c === void 0 ? void 0 : _c.status, (_d = e.response) === null || _d === void 0 ? void 0 : _d.data));
102
- VerdocsToast('Signup failed: ' + ((_f = (_e = e.response) === null || _e === void 0 ? void 0 : _e.data) === null || _f === void 0 ? void 0 : _f.message) || 'Unknown Error', { style: 'error' });
102
+ VerdocsToast('Signup failed: ' + ((_f = (_e = e.response) === null || _e === void 0 ? void 0 : _e.data) === null || _f === void 0 ? void 0 : _f.error) || 'Unknown Error', { style: 'error' });
103
103
  });
104
104
  }
105
105
  async handleVerification() {
@@ -50,6 +50,9 @@ const VerdocsSend = /*@__PURE__*/ proxyCustomElement(class VerdocsSend extends H
50
50
  var _a, _b, _c;
51
51
  try {
52
52
  this.endpoint.onSessionChanged((_endpoint, _session, profile) => {
53
+ if (!profile) {
54
+ return;
55
+ }
53
56
  const me = {
54
57
  id: profile.id,
55
58
  first_name: profile.first_name,