aboutsummaryrefslogtreecommitdiff
path: root/webAO/packets/handlers/handlePV.ts
diff options
context:
space:
mode:
Diffstat (limited to 'webAO/packets/handlers/handlePV.ts')
-rw-r--r--webAO/packets/handlers/handlePV.ts6
1 files changed, 3 insertions, 3 deletions
diff --git a/webAO/packets/handlers/handlePV.ts b/webAO/packets/handlers/handlePV.ts
index 90e47f1..0865fe8 100644
--- a/webAO/packets/handlers/handlePV.ts
+++ b/webAO/packets/handlers/handlePV.ts
@@ -60,10 +60,10 @@ export const handlePV = async (args: string[]) => {
let esfx;
let esfxd;
try {
- esfx = ini.soundn[i] || "0";
- esfxd = Number(ini.soundt[i]) || 0;
+ esfx = ini.soundn?.[i] || "0";
+ esfxd = ini.soundt?.[i] ? Number(ini.soundt[i]) : 0;
} catch (e) {
- console.warn("ini sound is completly missing");
+ console.warn(`ini sound is completly missing: ${e}`);
esfx = "0";
esfxd = 0;
}