refs #5472 fix req.data.error.code
gitea/salix/pipeline/head There was a failure building this commit Details

This commit is contained in:
Alex Moreno 2023-06-05 13:21:52 +02:00
parent 91b0e3013a
commit 64abf4bf14
2 changed files with 3 additions and 4 deletions

View File

@ -1,6 +1,6 @@
extends: [eslint:recommended, google, plugin:jasmine/recommended]
parserOptions:
ecmaVersion: 2018
ecmaVersion: 2020
sourceType: "module"
plugins:
- jasmine
@ -35,4 +35,4 @@ rules:
space-in-parens: ["error", "never"]
jasmine/no-focused-tests: 0
jasmine/prefer-toHaveBeenCalledWith: 0
arrow-spacing: ["error", { "before": true, "after": true }]
arrow-spacing: ["error", { "before": true, "after": true }]

View File

@ -27,8 +27,7 @@ export default class Controller {
this.loading = false;
this.password = '';
this.focusUser();
if (req.data.error.code == 'passExpired') {
if (req?.data?.error?.code == 'passExpired') {
const [args] = req.data.error.translateArgs;
this.$state.go('change-password', args);
}