Fakultas Ilmu Komputer UI

Commit 18f4d626 authored by Abraham Rudolf Brahmana's avatar Abraham Rudolf Brahmana
Browse files

refactor: Add error handling in isOwner function

parent 0bf6ae8d
Pipeline #87429 passed with stage
in 9 minutes and 45 seconds
......@@ -9,5 +9,9 @@ export const isOwner = async (ecosystemId: string, userId: string) => {
const ecosystem = snap.data() as IEcosystem;
return ecosystem.creatorId === userId;
try {
return ecosystem.creatorId === userId;
} catch (e) {
return false;
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment