camptocamp / cgxp

22 stars 22 forks source link

Fix syntax used to read a JSON response #1129

Closed asaunier closed 6 years ago

asaunier commented 6 years ago

The current syntax used in the Login plugin to read the response from the server after changing a password causes a JS error:

Login.js:601 Uncaught TypeError: Cannot read property 'json' of undefined

preventing the confirmation message from being displayed.

The PR fixes the error, by the way using a syntax already used at https://github.com/camptocamp/cgxp/blob/master/core/src/script/CGXP/plugins/Profile.js#L377

Question: do we need to add

@include OpenLayers/Format/JSON.js

at the top of the Login plugin? There is no such include in the Profile plugin.

asaunier commented 6 years ago

Thanks @sbrunner