Do not update button links if response is not successful

This commit is contained in:
dinamiko 2022-05-31 09:35:50 +02:00
parent 24280dda3a
commit 4b85831f52

View file

@ -87,6 +87,11 @@ const ppcp_onboarding = {
}).then((res)=>{
return res.json();
}).then((data)=>{
if (!data.success) {
console.error(data);
return;
}
buttons.forEach((element) => {
for (let [key, value] of Object.entries(data.data.signup_links)) {
key = 'connect-to' + key.replace(/-/g, '');