Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rating: Webchat dies when variant=emoji and precision=0.5 #85

Open
antonxt opened this issue Feb 16, 2021 · 0 comments
Open

Rating: Webchat dies when variant=emoji and precision=0.5 #85

antonxt opened this issue Feb 16, 2021 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@antonxt
Copy link

antonxt commented Feb 16, 2021

When the aforementioned combo is selected in the message payload, then the browser console shows this error and the whole webchat breaks (empty page).

Possible solution: in case of out-of-range values for the given variant, fall back to the nearest value that makes sense. E.g. consider precision=1 even when the message has precision=0.5

webchat.legacy.js:279 TypeError: Cannot read property 'label' of undefined
    at getLabelText (rating.webchat-plugin.js:966)
    at he (rating.webchat-plugin.js:379)
    at rating.webchat-plugin.js:379
    at Array.map (<anonymous>)
    at rating.webchat-plugin.js:379
    at Array.map (<anonymous>)
    at rating.webchat-plugin.js:379
    at da (webchat.legacy.js:279)
    at Ua (webchat.legacy.js:279)
    at Ts (webchat.legacy.js:279)
ps @ webchat.legacy.js:279
Ls.n.callback @ webchat.legacy.js:279
ki @ webchat.legacy.js:279
wi @ webchat.legacy.js:279
wu @ webchat.legacy.js:279
t.unstable_runWithPriority @ webchat.legacy.js:287
Jo @ webchat.legacy.js:279
vu @ webchat.legacy.js:279
su @ webchat.legacy.js:279
(anonymous) @ webchat.legacy.js:279
t.unstable_runWithPriority @ webchat.legacy.js:287
Jo @ webchat.legacy.js:279
Xo @ webchat.legacy.js:279
$o @ webchat.legacy.js:279
nu @ webchat.legacy.js:279
enqueueSetState @ webchat.legacy.js:279
w.setState @ webchat.legacy.js:271
(anonymous) @ webchat.legacy.js:322
b @ webchat.legacy.js:6
(anonymous) @ webchat.legacy.js:322
(anonymous) @ webchat.legacy.js:322
(anonymous) @ webchat.legacy.js:322
(anonymous) @ webchat.legacy.js:322
(anonymous) @ webchat.legacy.js:322
(anonymous) @ webchat.legacy.js:322
(anonymous) @ webchat.legacy.js:322
u.emit @ webchat.legacy.js:6
(anonymous) @ webchat.legacy.js:263
r.emit @ webchat.legacy.js:263
m.onevent @ webchat.legacy.js:263
m.onpacket @ webchat.legacy.js:263
(anonymous) @ webchat.legacy.js:263
r.emit @ webchat.legacy.js:263
m.ondecoded @ webchat.legacy.js:263
(anonymous) @ webchat.legacy.js:263
r.emit @ webchat.legacy.js:320
f.add @ webchat.legacy.js:6
m.ondata @ webchat.legacy.js:263
(anonymous) @ webchat.legacy.js:263
r.emit @ webchat.legacy.js:6
f.onPacket @ webchat.legacy.js:320
(anonymous) @ webchat.legacy.js:320
r.emit @ webchat.legacy.js:6
i.onPacket @ webchat.legacy.js:6
i.onData @ webchat.legacy.js:6
ws.onmessage @ webchat.legacy.js:322
Show 16 more frames
webchat.legacy.js:279 Uncaught TypeError: Cannot read property 'label' of undefined
    at getLabelText (rating.webchat-plugin.js:966)
    at he (rating.webchat-plugin.js:379)
    at rating.webchat-plugin.js:379
    at Array.map (<anonymous>)
    at rating.webchat-plugin.js:379
    at Array.map (<anonymous>)
    at rating.webchat-plugin.js:379
    at da (webchat.legacy.js:279)
    at Ua (webchat.legacy.js:279)
    at Ts (webchat.legacy.js:279)
@antonxt antonxt added the bug Something isn't working label Feb 16, 2021
@antonxt antonxt assigned antonxt and alexteusz and unassigned antonxt Feb 16, 2021
@antonxt antonxt changed the title Webchat dies when variant=emoji and precision=0.5 Rating: Webchat dies when variant=emoji and precision=0.5 Mar 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants