@wazo/sdk 1.0.0-alpha.4 → 1.0.0-alpha.5

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/esm/voice/call.js CHANGED
@@ -461,7 +461,7 @@ class Call extends EventEmitter {
461
461
  return otherCall && this.id && this.id === otherCall.id;
462
462
  }
463
463
  shouldAutoAnswer() {
464
- return !!this.sipCall.request.getHeader('alert-info');
464
+ return !!this.sipCall.request?.getHeader('alert-info');
465
465
  }
466
466
  get id() {
467
467
  return getSipSessionId(this.sipCall);
package/lib/voice/call.js CHANGED
@@ -507,7 +507,8 @@ class Call extends events_1.EventEmitter {
507
507
  return otherCall && this.id && this.id === otherCall.id;
508
508
  }
509
509
  shouldAutoAnswer() {
510
- return !!this.sipCall.request.getHeader('alert-info');
510
+ var _a;
511
+ return !!((_a = this.sipCall.request) === null || _a === void 0 ? void 0 : _a.getHeader('alert-info'));
511
512
  }
512
513
  get id() {
513
514
  return (0, sdp_1.getSipSessionId)(this.sipCall);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wazo/sdk",
3
- "version": "1.0.0-alpha.4",
3
+ "version": "1.0.0-alpha.5",
4
4
  "description": "Wazo's JavaScript Software Development Kit.",
5
5
  "main": "index.js",
6
6
  "types": "lib/types/index.d.ts",
package/src/voice/call.ts CHANGED
@@ -632,7 +632,7 @@ class Call extends EventEmitter {
632
632
  }
633
633
 
634
634
  shouldAutoAnswer() {
635
- return !!this.sipCall.request.getHeader('alert-info');
635
+ return !!this.sipCall.request?.getHeader('alert-info');
636
636
  }
637
637
 
638
638
  get id() {