From 716f793a5f1cfa0466e1ca6b6065023f00f7833b Mon Sep 17 00:00:00 2001 From: barredterra <14891507+barredterra@users.noreply.github.com> Date: Wed, 24 Apr 2024 12:22:14 +0200 Subject: [PATCH] fix: handle null in CSV preview (cherry picked from commit e93b0e8948a4c5489f7a599f12a368ebac6d5461) --- frappe/public/js/frappe/views/reports/report_utils.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/frappe/public/js/frappe/views/reports/report_utils.js b/frappe/public/js/frappe/views/reports/report_utils.js index 16b02c28a10..23656cabb7e 100644 --- a/frappe/public/js/frappe/views/reports/report_utils.js +++ b/frappe/public/js/frappe/views/reports/report_utils.js @@ -285,6 +285,10 @@ frappe.report_utils = { .map((row) => { return row .map((col) => { + if (col === null) { + return ""; + } + if (typeof col == "string" && col.includes('"')) { col = col.replace(/"/g, '""'); }