Skip to content

Commit

Permalink
add check for error type being a string, errorKeys
Browse files Browse the repository at this point in the history
  • Loading branch information
Gareth Redfern committed Jan 26, 2021
1 parent b018105 commit cacd8d9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/components/FlashMessage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,9 @@ export default {
},
computed: {
errorKeys() {
if (!this.error) return null;
if (!this.error || this.getType(this.error) === "string") {
return null;
}
return Object.keys(this.error);
},
},
Expand Down

0 comments on commit cacd8d9

Please sign in to comment.