You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by pk...@apache.org on 2021/10/15 08:11:01 UTC
[superset] branch master updated: fix for undefined userId (#17117)
This is an automated email from the ASF dual-hosted git repository.
pkdotson pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/superset.git
The following commit(s) were added to refs/heads/master by this push:
new c9c669d fix for undefined userId (#17117)
c9c669d is described below
commit c9c669d179080acd0fd00299016bb106b5c96699
Author: wijnanjo <jo...@gmail.com>
AuthorDate: Fri Oct 15 10:08:57 2021 +0200
fix for undefined userId (#17117)
Co-authored-by: jo.wijnant <jo...@kontron.com>
---
superset-frontend/src/views/CRUD/chart/ChartList.tsx | 2 +-
superset-frontend/src/views/CRUD/dashboard/DashboardList.tsx | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/superset-frontend/src/views/CRUD/chart/ChartList.tsx b/superset-frontend/src/views/CRUD/chart/ChartList.tsx
index 6f3e7b7..6eed27e 100644
--- a/superset-frontend/src/views/CRUD/chart/ChartList.tsx
+++ b/superset-frontend/src/views/CRUD/chart/ChartList.tsx
@@ -163,7 +163,7 @@ function ChartList(props: ChartListProps) {
const [preparingExport, setPreparingExport] = useState<boolean>(false);
const { userId } = props.user;
- const userKey = getFromLocalStorage(userId.toString(), null);
+ const userKey = getFromLocalStorage(userId?.toString(), null);
const openChartImportModal = () => {
showImportModal(true);
diff --git a/superset-frontend/src/views/CRUD/dashboard/DashboardList.tsx b/superset-frontend/src/views/CRUD/dashboard/DashboardList.tsx
index 04c0e8c..9ae2e4a 100644
--- a/superset-frontend/src/views/CRUD/dashboard/DashboardList.tsx
+++ b/superset-frontend/src/views/CRUD/dashboard/DashboardList.tsx
@@ -143,7 +143,7 @@ function DashboardList(props: DashboardListProps) {
};
const { userId } = props.user;
- const userKey = getFromLocalStorage(userId.toString(), null);
+ const userKey = getFromLocalStorage(userId?.toString(), null);
const canCreate = hasPerm('can_write');
const canEdit = hasPerm('can_write');