Skip to content

Commit a44b4c4

Browse files
committed
Fix changing email address error handling
1 parent eafc440 commit a44b4c4

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

resources/assets/scripts/components/dashboard/account/ChangePassword.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<template>
2-
<div>
2+
<div id="change-password-container" :class>
33
<form method="post" v-on:submit.prevent="submitForm">
44
<div class="content-box">
55
<h2 class="mb-6 text-grey-darkest font-medium">{{ $t('dashboard.account.password.title') }}</h2>

resources/assets/scripts/components/dashboard/account/UpdateEmail.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<template>
2-
<div :class>
2+
<div id="update-email-container" :class>
33
<form method="post" v-on:submit.prevent="submitForm">
44
<div class="content-box">
55
<h2 class="mb-6 text-grey-darkest font-medium">{{ $t('dashboard.account.email.title') }}</h2>

resources/assets/scripts/store/modules/auth.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,11 +71,11 @@ export default {
7171
.then(response => {
7272
// If there is a 302 redirect or some other odd behavior (basically, response that isnt
7373
// in JSON format) throw an error and don't try to continue with the login.
74-
if (!(response.data instanceof Object)) {
74+
if (!(response.data instanceof Object) && response.status !== 201) {
7575
return reject(new Error('An error was encountered while processing this request.'));
7676
}
7777

78-
commit('setEmail', response.data.email);
78+
commit('setEmail', email);
7979
return resolve();
8080
})
8181
.catch(reject);

0 commit comments

Comments
 (0)