From a7533b7864cc89ea7b3bc1305039bcaee7c06cb1 Mon Sep 17 00:00:00 2001 From: Jonas Lochmann Date: Mon, 26 Aug 2019 00:00:00 +0000 Subject: [PATCH] Adjust for updated @types/lodash --- .../dispatch-child-action/childchangepassword.ts | 6 +++++- .../dispatch-parent-action/changeparentpassword.ts | 6 +++++- .../dispatch-parent-action/setchildpassword.ts | 6 +++++- 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/src/function/sync/apply-actions/dispatch-child-action/childchangepassword.ts b/src/function/sync/apply-actions/dispatch-child-action/childchangepassword.ts index 1ba8d25..3b1c662 100644 --- a/src/function/sync/apply-actions/dispatch-child-action/childchangepassword.ts +++ b/src/function/sync/apply-actions/dispatch-child-action/childchangepassword.ts @@ -44,7 +44,11 @@ export const dispatchChildChangePassword = async ({ action, childUserId, cache } await childEntry.save({ transaction: cache.transaction }) - cache.getSecondPasswordHashOfChild.cache.clear() + { + const clear = cache.getSecondPasswordHashOfChild.cache.clear + clear && clear() + } + cache.invalidiateUserList = true cache.areChangesImportant = true } diff --git a/src/function/sync/apply-actions/dispatch-parent-action/changeparentpassword.ts b/src/function/sync/apply-actions/dispatch-parent-action/changeparentpassword.ts index 3de0cc9..c329c9b 100644 --- a/src/function/sync/apply-actions/dispatch-parent-action/changeparentpassword.ts +++ b/src/function/sync/apply-actions/dispatch-parent-action/changeparentpassword.ts @@ -46,7 +46,11 @@ export async function dispatchChangeParentPassword ({ action, cache }: { await parentEntry.save({ transaction: cache.transaction }) - cache.getSecondPasswordHashOfParent.cache.clear() + { + const clear = cache.getSecondPasswordHashOfParent.cache.clear + clear && clear() + } + cache.invalidiateUserList = true cache.areChangesImportant = true } diff --git a/src/function/sync/apply-actions/dispatch-parent-action/setchildpassword.ts b/src/function/sync/apply-actions/dispatch-parent-action/setchildpassword.ts index da2b000..95cb831 100644 --- a/src/function/sync/apply-actions/dispatch-parent-action/setchildpassword.ts +++ b/src/function/sync/apply-actions/dispatch-parent-action/setchildpassword.ts @@ -43,7 +43,11 @@ export async function dispatchSetChildPassword ({ action, cache }: { await childEntry.save({ transaction: cache.transaction }) - cache.getSecondPasswordHashOfChild.cache.clear() + { + const clear = cache.getSecondPasswordHashOfChild.cache.clear + clear && clear() + } + cache.invalidiateUserList = true cache.areChangesImportant = true }