up
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import { randomUUID } from 'node:crypto'
|
||||
import { performance } from 'node:perf_hooks'
|
||||
import { isDeepStrictEqual } from 'node:util'
|
||||
import type {
|
||||
Catalog,
|
||||
Channel,
|
||||
@@ -348,8 +349,11 @@ export class Controller {
|
||||
const key = this.state.catalog.key
|
||||
if (value !== null && !key) throw new Error('Сначала выберите пакет игры')
|
||||
const snapshot = value === null ? null : parseResults(value, key!)
|
||||
const hasChanged =
|
||||
!isDeepStrictEqual(this.state.results?.questions, snapshot?.questions) ||
|
||||
!isDeepStrictEqual(this.state.results?.teams, snapshot?.teams)
|
||||
this.state.results = snapshot
|
||||
if (this.state.scene.mode === 6) this.invalidateScene()
|
||||
if (hasChanged && this.state.scene.mode === 6) this.invalidateScene()
|
||||
this.broadcast()
|
||||
}
|
||||
reportScene(value: unknown) {
|
||||
|
||||
Reference in New Issue
Block a user