From b8914fef1b4f1f7eb4ce7e2e4a380a726f1a38c4 Mon Sep 17 00:00:00 2001 From: yflory Date: Mon, 12 Apr 2021 15:02:10 +0200 Subject: [PATCH] Improve logout app --- www/logout/main.js | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/www/logout/main.js b/www/logout/main.js index d23bb8969..7211dfa84 100644 --- a/www/logout/main.js +++ b/www/logout/main.js @@ -1,4 +1,13 @@ -define(['/bower_components/localforage/dist/localforage.min.js'], function (localForage) { - localForage.clear(); - localStorage.clear(); +define([ + '/bower_components/localforage/dist/localforage.min.js', + '/common/outer/cache-store.js', + '/bower_components/nthen/index.js', +], function (localForage, Cache, nThen) { + nThen(function (w) { + localStorage.clear(); + localForage.clear(w()); + Cache.clear(w()); + }).nThen(function () { + window.location.href = '/login/'; + }); });