Skip to content

Commit 994edac

Browse files
committed
Fixed globalThis usage when it might not exist
1 parent 5ebb900 commit 994edac

File tree

3 files changed

+2
-3
lines changed

3 files changed

+2
-3
lines changed

js/Core.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ class Core {
176176
// console.log(requestOptions);
177177
// console.log(postDataString);
178178
let requestPromise;
179-
if (globalThis.fetch) {
179+
if (globalThis && globalThis.fetch) {
180180
const { hostname, path, method, headers } = requestOptions;
181181
const url = `${this._protocol}//${hostname}${path}`;
182182
const init = {

js/clients/StoryClient.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
// import {cloneDeep} from 'lodash';
21
import _ from 'lodash';
32
import {ChatThread, StoryThread} from '../threads/index.js';
43

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "akun-api",
3-
"version": "5.0.0",
3+
"version": "5.0.1",
44
"description": "A module intended to enable easy interactions with Anonkun",
55
"main": "index.js",
66
"type": "module",

0 commit comments

Comments
 (0)