main ← issue/fix-promise-finally-error
opened 05:41AM - 01 Jun 22 UTC
There are some cases when the .save() call within
.perspectiveSave() would retu…rn null instead of a promise,
causing an error. We return null sometimes in core from
this function, so we just check whether the result is null
or a promise and act accordingly.
Also adds some tests and does some minor refactoring.
c.f. https://meta.discourse.org/t/javascript-error-in-google-perspective-api-plugin/226732