Skip to content

Commit 8c54526

Browse files
authored
Merge pull request #20 from kingscode/fix-error-undefined-return-value
Fix the incorrect undefined return type in Error store
2 parents c26b173 + 3af9735 commit 8c54526

File tree

1 file changed

+1
-1
lines changed
  • generator/templates/Default/src/store/modules

1 file changed

+1
-1
lines changed

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)