@unboundcx/sdk-internal 1.0.2 → 1.0.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.
Files changed (2) hide show
  1. package/index.js +5 -2
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -43,9 +43,12 @@ export class InternalSDK {
43
43
  }
44
44
  });
45
45
 
46
- // Proxy all prototype methods
46
+ // Proxy all prototype methods, but don't override methods that already exist in InternalSDK
47
47
  baseSdkMethods.forEach(method => {
48
- if (method !== 'constructor' && typeof this.sdk[method] === 'function' && !this.hasOwnProperty(method)) {
48
+ if (method !== 'constructor' &&
49
+ typeof this.sdk[method] === 'function' &&
50
+ !this.hasOwnProperty(method) &&
51
+ !InternalSDK.prototype.hasOwnProperty(method)) {
49
52
  this[method] = (...args) => this.sdk[method](...args);
50
53
  }
51
54
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@unboundcx/sdk-internal",
3
- "version": "1.0.2",
3
+ "version": "1.0.3",
4
4
  "description": "Internal SDK extension for Unbound - Provides access to internal APIs and administrative functions",
5
5
  "main": "index.js",
6
6
  "type": "module",