@0xsequence/metadata 0.43.16 → 0.43.18

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.
@@ -262,7 +262,7 @@ const buildResponse = res => {
262
262
  });
263
263
  };
264
264
 
265
- const fetch = global ? global.fetch : window.fetch;
265
+ const fetch = typeof global === 'object' ? global.fetch : window.fetch;
266
266
  class SequenceMetadataClient extends Metadata {
267
267
  constructor(hostname = 'https://metadata.sequence.app') {
268
268
  super(hostname.endsWith('/') ? hostname.slice(0, -1) : hostname, fetch);
@@ -262,7 +262,7 @@ const buildResponse = res => {
262
262
  });
263
263
  };
264
264
 
265
- const fetch = global ? global.fetch : window.fetch;
265
+ const fetch = typeof global === 'object' ? global.fetch : window.fetch;
266
266
  class SequenceMetadataClient extends Metadata {
267
267
  constructor(hostname = 'https://metadata.sequence.app') {
268
268
  super(hostname.endsWith('/') ? hostname.slice(0, -1) : hostname, fetch);
@@ -258,7 +258,7 @@ const buildResponse = res => {
258
258
  });
259
259
  };
260
260
 
261
- const fetch = global ? global.fetch : window.fetch;
261
+ const fetch = typeof global === 'object' ? global.fetch : window.fetch;
262
262
  class SequenceMetadataClient extends Metadata {
263
263
  constructor(hostname = 'https://metadata.sequence.app') {
264
264
  super(hostname.endsWith('/') ? hostname.slice(0, -1) : hostname, fetch);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@0xsequence/metadata",
3
- "version": "0.43.16",
3
+ "version": "0.43.18",
4
4
  "description": "metadata sub-package for Sequence",
5
5
  "repository": "https://github.com/0xsequence/sequence.js/tree/master/packages/metadata",
6
6
  "source": "src/index.ts",
package/src/index.ts CHANGED
@@ -2,7 +2,7 @@ export * from './metadata.gen'
2
2
 
3
3
  import { Metadata as MetadataRpc } from './metadata.gen'
4
4
 
5
- const fetch = global ? global.fetch : window.fetch
5
+ const fetch = typeof global === 'object' ? global.fetch : window.fetch
6
6
 
7
7
  export class SequenceMetadataClient extends MetadataRpc {
8
8
  constructor(hostname: string = 'https://metadata.sequence.app') {