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:
parent
ccd1d3d69e
commit
ff4491d7e3
1 changed files with 3 additions and 0 deletions
|
@ -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));
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue