Skip to content

Commit 948631f

Browse files
author
Gareth Redfern
committed
update error helper & flash message
1 parent 3ea6b3c commit 948631f

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/components/FlashMessage.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ export default {
1818
default: null,
1919
},
2020
error: {
21-
type: [Object, String],
21+
type: [Error, String],
2222
default: null,
2323
},
2424
},

src/utils/helpers.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
export const getError = (error) => {
22
console.debug({ error });
3-
return error.data.errors ? error.data.errors : error;
3+
return error.data && error.data.errors ? error.data.errors : error;
44
};

0 commit comments

Comments
 (0)