Javascript error in Google Perspective API plugin

We’re seeing this:

TypeError: Cannot read properties of undefined (reading 'finally')
    at n.perspectiveSave (https://REDACTED/assets/plugins/discourse-perspective-api-12d54e93711215e76c0e9e41ddcbaff5276b541b4db8c82f8731e6544a60b4c6.js:1:1041)

which seems to come from calling a finally() method while the function before that in the chain is not returning anything under various circumstances (there are three return statements without arguments in the code).

I am not familiar enough with this specific logic to figure out what should be returned in these places.


yeah … this kind of looks like it is intended to be an async function and these days we support that.

We will have a look over the next few weeks and get it sorted.