mirror of
https://github.com/tribufu/tribufu-js
synced 2026-05-06 06:47:27 +00:00
Fix nodejs process check
This commit is contained in:
parent
10a0619f80
commit
9c54143d2e
4 changed files with 736 additions and 658 deletions
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "tribufu",
|
||||
"version": "0.1.28",
|
||||
"version": "0.1.29",
|
||||
"description": "Tribufu JS SDK",
|
||||
"repository": "https://github.com/Tribufu/TribufuJs",
|
||||
"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
|
||||
*/
|
||||
public static debugEnabled(): boolean {
|
||||
if (!process) {
|
||||
return false;
|
||||
if (typeof process !== "undefined") {
|
||||
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 {
|
||||
if (!process) {
|
||||
if (typeof process === "undefined") {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
|
@ -93,7 +93,7 @@ export class TribufuApi extends TribufuApiGenerated {
|
|||
* @returns string
|
||||
*/
|
||||
protected static getBaseUrl(): string {
|
||||
if (!process) {
|
||||
if (typeof process === "undefined") {
|
||||
return TRIBUFU_API_URL;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue