Commit 7d834e2d authored by Christopher Fullarton's avatar Christopher Fullarton

Fixes the build script. Fixes error when loading a quiz if no quizname is provided

parent 79af68a2
Pipeline #33454 canceled with stages
in 3 minutes and 12 seconds
......@@ -81,10 +81,12 @@ generate_assets:
- cd dist
- angular-http-server --path browser/ --silent -p 4711 &
- cd browser/assets/jobs
- node --experimental-modules GenerateImages.mjs --command=generateLogoImages
- node --experimental-modules GenerateImages.mjs --command=generateFrontendPreview --host=http://localhost:4711 --root=true
- node GenerateMetaNodes.js --command=generateLinkImages --baseUrl=https://staging.arsnova.click
- node GenerateMetaNodes.js --command=generateManifest --baseUrl=https://staging.arsnova.click
- node --experimental-modules GenerateImages.mjs --command=generateLogoImages
- node --experimental-modules GenerateImages.mjs --command=generateFrontendPreview --host=http://localhost:4711 --root=true
- cd ../../../..
- npm run compress
artifacts:
paths:
- dist
......@@ -128,7 +130,6 @@ deploy:
- ssh-keyscan "$STAGING_FRONTEND_URL" >> ~/.ssh/known_hosts
- ssh-add <(echo "$STAGING_SSH_PRIVATE_KEY")
#- rm dist/*.map
- npm run compress
- rsync -rltgoDqv --delete -e "ssh" dist/* "$STAGING_FRONTEND_SCP_URL"
- ssh $STAGING_SSH 'touch /home/arsnova/arsnova.click-v2/frontend/deploy.touch'
......@@ -164,10 +165,12 @@ generate_assets-beta:
- cd dist
- angular-http-server --path browser/ --silent -p 4711 &
- cd browser/assets/jobs
- node --experimental-modules GenerateImages.mjs --command=generateLogoImages
- node --experimental-modules GenerateImages.mjs --command=generateFrontendPreview --host=http://localhost:4711 --root=true
- node GenerateMetaNodes.js --command=generateLinkImages --baseUrl=https://beta.arsnova.click
- node GenerateMetaNodes.js --command=generateManifest --baseUrl=https://beta.arsnova.click
- node --experimental-modules GenerateImages.mjs --command=generateLogoImages
- node --experimental-modules GenerateImages.mjs --command=generateFrontendPreview --host=http://localhost:4711 --root=true
- cd ../../../..
- npm run compress
artifacts:
paths:
- dist
......@@ -211,6 +214,5 @@ deploy-beta:
- ssh-keyscan "$STAGING_FRONTEND_URL" >> ~/.ssh/known_hosts
- ssh-add <(echo "$STAGING_SSH_PRIVATE_KEY")
#- rm dist/*.map
- npm run compress
- rsync -rltgoDqv --delete -e "ssh" dist/* "$BETA_FRONTEND_SCP_URL"
- ssh $STAGING_SSH 'touch /home/arsnova/arsnova.click-v2-beta/frontend/deploy.touch'
......@@ -157,6 +157,10 @@ export class QuizService {
public loadDataToPlay(quizName: string): Promise<boolean> {
return new Promise<boolean>((resolve, reject) => {
if (!quizName) {
reject('QuizService: No quizname provided');
}
if (this.quiz) {
console.log('QuizService: aborting loadDataToPlay since the quiz is already present', quizName);
resolve();
......@@ -174,6 +178,10 @@ export class QuizService {
}
public loadDataToEdit(quizName: string): void {
if (!quizName) {
return;
}
this.storageService.db.Quiz.get(quizName).then(quiz => {
if (!quiz) {
return;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment