Skip to content

Commit

Permalink
fix for undefined userId (#17117)
Browse files Browse the repository at this point in the history
Co-authored-by: jo.wijnant <[email protected]>
  • Loading branch information
wijnanjo and jo.wijnant authored Oct 15, 2021
1 parent 5253193 commit c9c669d
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 c9c669d

Please sign in to comment.