Fixes issue in the frontend node server

parent 12bbc7a3
......@@ -25,7 +25,7 @@
"e2e": "ng e2e --port 4201",
"purify": "node purifycss.js",
"compress": "gzip dist/browser/** -r",
"http-startup": "http-server dist/browser/ -p 4711 --gzip",
"http-startup": "http-server dist/browser/ -p 4711",
"prod-test": "npm run build:PROD && npm run purify && npm run compress && npm run http-startup",
"prod-test:SSR": "npm run build:SSR && npm run start:SSR",
"job:images:logo": "cd dist/jobs/; node --experimental-modules GenerateImages.mjs --command=generateLogoImages",
......
......@@ -106,7 +106,11 @@ export class CurrentQuizService implements ICurrentQuiz {
});
}
this.connectionService.initConnection().then(() => {
connectionService.socket.subscribe((data: IMessage) => {
if (!this.connectionService.socket) {
return;
}
this.connectionService.socket.subscribe((data: IMessage) => {
if (data.status === 'STATUS:SUCCESSFUL' && data.step === 'QUIZ:UPDATED_SETTINGS') {
this._quiz.sessionConfig[data.payload.target] = data.payload.state;
this.persistToSessionStorage();
......
......@@ -39,7 +39,11 @@ export class ThemesService {
}
this.connectionService.initConnection().then(() => {
connectionService.socket.subscribe(data => {
if (!this.connectionService.socket) {
return;
}
this.connectionService.socket.subscribe(data => {
if (data.status === 'STATUS:SUCCESSFUL' && data.step === 'QUIZ:UPDATED_SETTINGS') {
this.currentQuizService.quiz.sessionConfig[data.payload.target] = data.payload.state;
this.currentQuizService.persistToSessionStorage();
......
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