fix: undefined value in TimerManager

This commit is contained in:
Ben Allfree 2023-06-18 05:51:04 -07:00
parent 4f43f9fa54
commit cfd4b8f73a

View File

@ -1,4 +1,4 @@
import { forEach } from '@s-libs/micro-dash' import { forEach, values } from '@s-libs/micro-dash'
import { logger } from './Logger' import { logger } from './Logger'
export type UnixTimestampMs = number export type UnixTimestampMs = number
@ -38,7 +38,7 @@ export const createTimerManager = (config: TimeManagerConfig) => {
const shutdown = () => { const shutdown = () => {
isShutDown = true isShutDown = true
dbg(`Canceling ${cleanups.length} timers`) dbg(`Canceling ${values(cleanups.length).length} timers`)
forEach(cleanups, (c) => c()) forEach(cleanups, (c) => c())
dbg(`done`, cleanups) dbg(`done`, cleanups)
} }