Skip to content

Commit

Permalink
fix for undefined userId
Browse files Browse the repository at this point in the history
  • Loading branch information
jo.wijnant committed Oct 14, 2021
1 parent d944503 commit 2a2fbdd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion superset-frontend/src/views/CRUD/chart/ChartList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down

0 comments on commit 2a2fbdd

Please sign in to comment.