From 2776cc25752b6e669aa44f77e2863e5563fe303b Mon Sep 17 00:00:00 2001 From: Eduardo San Martin Morote Date: Wed, 21 Jul 2021 10:41:56 +0200 Subject: [PATCH] chore: comments --- src/store.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/store.ts b/src/store.ts index bd7a72ca..274c5f33 100644 --- a/src/store.ts +++ b/src/store.ts @@ -353,7 +353,7 @@ function createSetupStore< let ret: any try { ret = action.apply(this || store, args) - // Promise.resolve(ret).then(afterCallback).catch(onErrorCallback) + // handle sync errors } catch (error) { if (onErrorCallback(error) !== false) { throw error @@ -374,8 +374,8 @@ function createSetupStore< }) } + // allow the afterCallback to override the return value const newRet = afterCallback(ret) - return newRet === undefined ? ret : newRet } } -- 2.47.2