From 6566e1a4e9c4503f5488ac50b2fded8b4f954642 Mon Sep 17 00:00:00 2001 From: Immanuel Onyeka Date: Wed, 23 Aug 2023 15:35:43 -0400 Subject: [PATCH] Fix type and syntax errors --- components/settings.vue | 3 ++- migrations/seed.sql | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/components/settings.vue b/components/settings.vue index e38cc43..7c45e61 100644 --- a/components/settings.vue +++ b/components/settings.vue @@ -120,6 +120,7 @@ function uploadLetterhead() { } function setLetterhead(f) { + letterheadError.value = "" const validTypes = ['image/jpeg', 'image/png'] if (!validTypes.includes(f.type)) { @@ -145,7 +146,7 @@ function setLetterhead(f) { function changeAvatar(blob) { const validTypes = ['image/jpeg', 'image/png'] - if (!validTypes.includes(blob.type)) { + if (!validTypes.includes(blob?.type)) { avatarError.value = 'Image must be JPEG of PNG format' return } diff --git a/migrations/seed.sql b/migrations/seed.sql index 22a2e81..e2cca16 100644 --- a/migrations/seed.sql +++ b/migrations/seed.sql @@ -41,7 +41,7 @@ INSERT IGNORE INTO user ( 'Coltrane', sha2('test123', 256), 1, - '9059991111' + '9059991111', (SELECT id FROM branch LIMIT 1), 'Canada', 'Loan Officer',