From 6a23aac6f92555cd3287672e864c67d340448f28 Mon Sep 17 00:00:00 2001 From: Riccardo Balbo Date: Sun, 20 Oct 2024 09:38:04 +0200 Subject: [PATCH] Update api/resolvers/vault.js --- api/resolvers/vault.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/resolvers/vault.js b/api/resolvers/vault.js index 6c13eda2..279dd933 100644 --- a/api/resolvers/vault.js +++ b/api/resolvers/vault.js @@ -141,7 +141,7 @@ export default { */ function checkOwner (info, ownerType) { const gqltypeDef = info.schema.getType(ownerType) - const ownerInterfaces = gqltypeDef?.getInterfaces ? gqltypeDef.getInterfaces() : null + const ownerInterfaces = gqltypeDef?.getInterfaces?.() if (!ownerInterfaces?.some((iface) => iface.name === 'VaultOwner')) { throw new GqlInputError('owner must implement VaultOwner interface but ' + ownerType + ' does not') }