arianne / stendhal

Stendhal is a fun friendly and free multiplayer online adventure game with an old school feel.
https://arianne-project.org
GNU General Public License v2.0
593 stars 200 forks source link

Chat Options Error When Talking to NPC Without Dialogue #739

Open AntumDeluge opened 3 months ago

AntumDeluge commented 3 months ago

🐞 Describe the bug

Came across the following error in web client when attempting to talk with an NPC without dialogue:

Uncaught TypeError: $module$build$ts$util$Chat$default$$.$Chat$.options[0] is undefined
    $execute$ ChatOptionsEvent.ts:43
    $onEvent$ RPObject.ts:36
    $addChanges$ perception.js:424
    $applyPerceptionMyRPObject$ perception.js:283
    apply perception.js:170
    $onPerception$ client-framework.js:210
    t19 message-factory.js:57
    $onMessage$ client-framework.js:114
3 ChatOptionsEvent.ts:43:34
    $execute$ ChatOptionsEvent.ts:43
    $onEvent$ RPObject.ts:36
    $addChanges$ perception.js:424
    $applyPerceptionMyRPObject$ perception.js:283
    apply perception.js:170
    $onPerception$ client-framework.js:210
    t19 message-factory.js:57
    $onMessage$ client-framework.js:114

Not a serious error as generally there are no SpeakerNPC instances without dialogue. But probably should be handled anyway.

🌍 Environment