Skip to content
This repository has been archived by the owner on Dec 28, 2021. It is now read-only.

Commit

Permalink
Fix the project CLI flag (#1774)
Browse files Browse the repository at this point in the history
fix the --project flag
  • Loading branch information
4e6 authored Aug 19, 2021
1 parent 525b340 commit aee3f33
Showing 1 changed file with 13 additions and 8 deletions.
21 changes: 13 additions & 8 deletions src/js/lib/content/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -946,6 +946,17 @@ async function mainEntryPoint(config: Config) {
}
}

async function runEntryPoint(config: Config) {
if (ok(config.project)) {
await mainEntryPoint(config)
} else {
await templates.loadTemplatesView((name: string) => {
config.project = name
mainEntryPoint(config)
})
}
}

API.main = async function(inputConfig: any) {
const urlParams = new URLSearchParams(window.location.search)
// @ts-ignore
Expand All @@ -959,16 +970,10 @@ API.main = async function(inputConfig: any) {
if (config.authentication_enabled && !Versions.isDevVersion()) {
new FirebaseAuthentication(function(user: any) {
config.email = user.email
templates.loadTemplatesView((name: string) => {
config.project = name
mainEntryPoint(config)
})
runEntryPoint(config)
})
} else {
await templates.loadTemplatesView((name: string) => {
config.project = name
mainEntryPoint(config)
})
await runEntryPoint(config)
}
} else {
// Display a message asking to update the application.
Expand Down

0 comments on commit aee3f33

Please sign in to comment.