mirror of
https://github.com/revoltchat/revite.git
synced 2024-11-10 01:03:36 -05:00
feat: add better debugging flags
This commit is contained in:
parent
bdb1d939e7
commit
a688063d96
2 changed files with 6 additions and 1 deletions
|
@ -3,6 +3,7 @@ import { RevoltConfiguration } from "revolt-api/types/Core";
|
|||
import { Client } from "revolt.js";
|
||||
import { Nullable } from "revolt.js/dist/util/null";
|
||||
|
||||
import { isDebug } from "../../revision";
|
||||
import Persistent from "../interfaces/Persistent";
|
||||
import Store from "../interfaces/Store";
|
||||
|
||||
|
@ -44,7 +45,7 @@ export default class ServerConfig
|
|||
unreads: true,
|
||||
autoReconnect: false,
|
||||
apiURL: import.meta.env.VITE_API_URL,
|
||||
debug: import.meta.env.DEV,
|
||||
debug: isDebug(),
|
||||
});
|
||||
|
||||
if (this.config !== null) {
|
||||
|
|
|
@ -4,3 +4,7 @@
|
|||
export const REPO_URL: string = "https://github.com/revoltchat/revite/commit";
|
||||
export const GIT_REVISION: string = "__GIT_REVISION__";
|
||||
export const GIT_BRANCH: string = "__GIT_BRANCH__";
|
||||
|
||||
export function isDebug() {
|
||||
return import.meta.env.FORCE_DEBUG === "1" || import.meta.env.DEV;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue