Skip to content

Commit

Permalink
update environment init and package.json version
Browse files Browse the repository at this point in the history
  • Loading branch information
MetaverseUnknower committed Nov 26, 2023
1 parent ea23e88 commit b24133b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "vlm-dcl",
"version": "1.0.0",
"version": "1.0.0-alpha.0",
"description": "Virtual Land Manager for Decentraland",
"main": "./dist/index.js",
"types": "./dist/index.d.ts",
Expand Down
10 changes: 7 additions & 3 deletions src/environment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,18 @@ export abstract class VLMEnvironment {
static init: CallableFunction = async (config: VLMInitConfig) => {
try {
this.devMode = (await isPreviewMode({})).isPreview
if (!config.env || (config.env !== 'prod' && !this.devMode)) {
if (!config?.env || (config.env !== 'prod' && !this.devMode)) {
config.env = 'prod'
}
if (config.debug) {
if (config?.debug) {
VLMDebug.init(config.debug)
}

ecs = config.ecs || ecsLib
if (config?.ecs) {
ecs = config?.ecs
} else {
ecs = ecsLib
}

VLMDebug.log(`Initializing ${config.env} environment`)
this.apiUrl = this.apiUrls[config.env]
Expand Down

0 comments on commit b24133b

Please sign in to comment.