mirror of
https://github.com/apache/superset.git
synced 2024-09-12 08:39:45 -04:00
fix for undefined userId (#17117)
Co-authored-by: jo.wijnant <jo.wijnant@kontron.com>
This commit is contained in:
parent
5253193708
commit
c9c669d179
@ -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);
|
||||
|
@ -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');
|
||||
|
Loading…
Reference in New Issue
Block a user