fix: only send hints when it's not empty

This commit is contained in:
Lin, Hung-Shin committed 2023-11-21 12:16:01 +08:00
1 parent a8ba2a640b
commit 56d96cf7a0
1 file changed
+2
+2
View File
@@ -47,6 +47,7 @@ export default class SessionHandler {
t.completed = true
})
if (stage.hints && stage.hints.length > 0)
this.session.hints.push(stage.hints)
this.addNewTasks()
@@ -56,6 +57,7 @@ export default class SessionHandler {
hints: stage.hints,
callback: () => {
pushToSession(this.session.id, 'tasks', this.session.tasks)
if (stage.hints && stage.hints.length > 0)
pushToSession(this.session.id, 'hints', stage.hints)
pushToSession(this.session.id, 'status', this.session.status)
},