mirror of
https://github.com/stoatchat/javascript-client-sdk.git
synced 2026-07-16 07:04:24 -04:00
fix: missing undefined check on policy_changes (#122)
* feat: add nix shell Signed-off-by: Amy <amy+git@amogus.cloud> * fix: missing undefined check in policy_changes Signed-off-by: Amy <amy+git@amogus.cloud> --------- Signed-off-by: Amy <amy+git@amogus.cloud>
This commit is contained in:
+1
-1
@@ -322,7 +322,7 @@ export async function handleEvent(
|
||||
setReady(true);
|
||||
client.emit("ready");
|
||||
|
||||
if (event.policy_changes.length) {
|
||||
if (event.policy_changes?.length) {
|
||||
client.emit("policyChanges", event.policy_changes, async () =>
|
||||
client.api.post("/policy/acknowledge"),
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user