mirror of
https://github.com/tribufu/sdk-js
synced 2025-06-15 18:24:19 +00:00
Fix nodejs process check
This commit is contained in:
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "tribufu",
|
"name": "tribufu",
|
||||||
"version": "0.1.28",
|
"version": "0.1.29",
|
||||||
"description": "Tribufu JS SDK",
|
"description": "Tribufu JS SDK",
|
||||||
"repository": "https://github.com/Tribufu/TribufuJs",
|
"repository": "https://github.com/Tribufu/TribufuJs",
|
||||||
"author": "Tribufu <contact@Tribufu.com>",
|
"author": "Tribufu <contact@Tribufu.com>",
|
||||||
|
1382
pnpm-lock.yaml
generated
1382
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
@ -18,11 +18,11 @@ export abstract class TribufuApiBase {
|
|||||||
* @returns boolean
|
* @returns boolean
|
||||||
*/
|
*/
|
||||||
public static debugEnabled(): boolean {
|
public static debugEnabled(): boolean {
|
||||||
if (!process) {
|
if (typeof process !== "undefined") {
|
||||||
return false;
|
return process.env.NODE_ENV === "development";
|
||||||
}
|
}
|
||||||
|
|
||||||
return process.env.NODE_ENV === "development";
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -53,7 +53,7 @@ export class TribufuApi extends TribufuApiGenerated {
|
|||||||
* ```
|
* ```
|
||||||
*/
|
*/
|
||||||
public static fromEnv(prefix?: string | null): TribufuApi | null {
|
public static fromEnv(prefix?: string | null): TribufuApi | null {
|
||||||
if (!process) {
|
if (typeof process === "undefined") {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -93,7 +93,7 @@ export class TribufuApi extends TribufuApiGenerated {
|
|||||||
* @returns string
|
* @returns string
|
||||||
*/
|
*/
|
||||||
protected static getBaseUrl(): string {
|
protected static getBaseUrl(): string {
|
||||||
if (!process) {
|
if (typeof process === "undefined") {
|
||||||
return TRIBUFU_API_URL;
|
return TRIBUFU_API_URL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user