3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-05-25 10:25:01 +00:00

missing safety nulls on set_counter fn

Signed-off-by: GitHub <noreply@github.com>
This commit is contained in:
metal 2022-11-23 11:32:32 +00:00 committed by GitHub
parent ccd1d3d69e
commit ff4491d7e3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -25,6 +25,9 @@ export async function setCounterValue(
throw new Error(`Counter is per user but no user ID was supplied`);
}
channelId = counter.per_channel ? channelId : null;
userId = counter.per_user ? userId : null;
const counterId = pluginData.state.counterIds[counterName];
const lock = await pluginData.locks.acquire(counterIdLock(counterId));