Skip to content

Commit 3af9735

Browse files
committed
Fix the incorrect undefined return type in Error store
1 parent c26b173 commit 3af9735

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • generator/templates/Default/src/store/modules

generator/templates/Default/src/store/modules/Error.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ export default {
2323
find: state => key => {
2424
const error = state.errors.find(x => x.key === key);
2525

26-
if (error) return error.message;
26+
return error ? error.message : '';
2727
},
2828
hasError: state => !!state.errors.length,
2929
first: state => {

0 commit comments

Comments
 (0)