From 7da6e5db345f4555124f4005305f9ba09b5f40ba Mon Sep 17 00:00:00 2001 From: Wing-Kam Wong Date: Tue, 12 Apr 2022 19:05:30 +0800 Subject: [PATCH] fix: cache export Signed-off-by: Wing-Kam Wong --- .../components/project/spreadsheet/rowsXcDataTable.vue | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/nc-gui/components/project/spreadsheet/rowsXcDataTable.vue b/packages/nc-gui/components/project/spreadsheet/rowsXcDataTable.vue index a4c75a65d3..cbee6036fd 100644 --- a/packages/nc-gui/components/project/spreadsheet/rowsXcDataTable.vue +++ b/packages/nc-gui/components/project/spreadsheet/rowsXcDataTable.vue @@ -1497,13 +1497,13 @@ export default { async exportCache() { try { const data = (await this.$api.utils.cacheGet()) - if (!data.length) { + if (!data) { this.$toast.info('Cache is empty').goAway(3000) return } const blob = new Blob([JSON.stringify(data)], { type: 'text/plain;charset=utf-8' }) FileSaver.saveAs(blob, 'cache_exported.json') - this.$toast.info('Copied Cache to clipboard').goAway(3000) + this.$toast.info('Exported Cache Successfully').goAway(3000) } catch (e) { console.log(e) this.$toast.error(e.message).goAway(3000) @@ -1512,7 +1512,7 @@ export default { async deleteCache() { try { await this.$api.utils.cacheDelete() - this.$toast.info('Deleted Cache').goAway(3000) + this.$toast.info('Deleted Cache Successfully').goAway(3000) } catch (e) { console.log(e) this.$toast.error(e.message).goAway(3000)