@progus/connector 0.7.2 → 0.7.3

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/dist/index.cjs CHANGED
@@ -389,8 +389,9 @@ function createProgusConnector(config) {
389
389
  }
390
390
  }
391
391
  function normalizeSubscriptionData(data) {
392
- const subscriptionId = Number(data.subscriptionId);
393
- if (!Number.isFinite(subscriptionId)) {
392
+ const rawId = data.subscriptionId;
393
+ const subscriptionId = rawId != null && rawId !== "" ? typeof rawId === "number" && Number.isFinite(rawId) ? rawId : String(rawId) : null;
394
+ if (subscriptionId === null) {
394
395
  return null;
395
396
  }
396
397
  const subscriptionPrice = Number(data.subscriptionPrice);
package/dist/index.js CHANGED
@@ -346,8 +346,9 @@ function createProgusConnector(config) {
346
346
  }
347
347
  }
348
348
  function normalizeSubscriptionData(data) {
349
- const subscriptionId = Number(data.subscriptionId);
350
- if (!Number.isFinite(subscriptionId)) {
349
+ const rawId = data.subscriptionId;
350
+ const subscriptionId = rawId != null && rawId !== "" ? typeof rawId === "number" && Number.isFinite(rawId) ? rawId : String(rawId) : null;
351
+ if (subscriptionId === null) {
351
352
  return null;
352
353
  }
353
354
  const subscriptionPrice = Number(data.subscriptionPrice);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@progus/connector",
3
- "version": "0.7.2",
3
+ "version": "0.7.3",
4
4
  "description": "Progus partner/affiliate connector helpers",
5
5
  "license": "MIT",
6
6
  "type": "module",