mirror of
https://github.com/supabase/supabase.git
synced 2026-10-05 09:25:06 +03:00
Fix typos
This commit is contained in:
1 parent
20b42f2824
commit
325a2d84f9
1 file changed
+5
-5
@@ -40,7 +40,7 @@ export default defineComponent({
|
||||
const task = ref('')
|
||||
|
||||
/**
|
||||
* Wrapper function adding a new todo for additional client side error handling.
|
||||
* Wrapper function adding a new todo for additional client-side error handling.
|
||||
*/
|
||||
async function insertTask() {
|
||||
// Guard for short task descriptions which will fail db policy.
|
||||
@@ -54,17 +54,17 @@ export default defineComponent({
|
||||
return
|
||||
}
|
||||
try {
|
||||
// Try and wrie the data to to the database
|
||||
// Try and write the data to the database.
|
||||
const todo = await addTodo({ user_id: userSession.value.user.id, task: task.value })
|
||||
|
||||
// If there was no response, dont do anything.
|
||||
// If there was no response, don't do anything.
|
||||
if (!todo) {
|
||||
return
|
||||
}
|
||||
// Otherwise push the response into allTodos.
|
||||
// Otherwise, push the response into allTodos.
|
||||
allTodos.value.push(todo)
|
||||
|
||||
// Reset inptut feild
|
||||
// Reset input field.
|
||||
task.value = ''
|
||||
} catch (err) {
|
||||
console.error('Unknown error when adding todo', err)
|
||||
|
||||
Reference in new issue
Block a user