Skip to content

Commit

Permalink
Fix SliceAdder create new chart link
Browse files Browse the repository at this point in the history
  • Loading branch information
martyngigg committed Oct 15, 2024
1 parent 2703ec6 commit 09a05b3
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions superset-frontend/src/dashboard/components/SliceAdder.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ import { Select } from 'src/components';
import Loading from 'src/components/Loading';
import Button from 'src/components/Button';
import Icons from 'src/components/Icons';
import { ensureBasePath } from 'src/utils/pathUtils';
import {
LocalStorageKeys,
getItem,
Expand Down Expand Up @@ -202,8 +203,8 @@ class SliceAdder extends Component {
.filter(slice =>
showOnlyMyCharts
? (slice.owners &&
slice.owners.find(owner => owner.id === this.props.userId)) ||
(slice.created_by && slice.created_by.id === this.props.userId)
slice.owners.find(owner => owner.id === this.props.userId)) ||

Check failure on line 206 in superset-frontend/src/dashboard/components/SliceAdder.jsx

View workflow job for this annotation

GitHub Actions / frontend-build

Insert `··`
(slice.created_by && slice.created_by.id === this.props.userId)

Check failure on line 207 in superset-frontend/src/dashboard/components/SliceAdder.jsx

View workflow job for this annotation

GitHub Actions / frontend-build

Insert `··`
: true,
)
.filter(createFilter(searchTerm, KEYS_TO_FILTERS))
Expand Down Expand Up @@ -330,7 +331,7 @@ class SliceAdder extends Component {
buttonSize="xsmall"
onClick={() =>
window.open(
`/chart/add?dashboard_id=${this.props.dashboardId}`,
ensureBasePath(`/chart/add?dashboard_id=${this.props.dashboardId}`),

Check failure on line 334 in superset-frontend/src/dashboard/components/SliceAdder.jsx

View workflow job for this annotation

GitHub Actions / frontend-build

Replace ``/chart/add?dashboard_id=${this.props.dashboardId}`` with `⏎··················`/chart/add?dashboard_id=${this.props.dashboardId}`,⏎················`
'_blank',
'noopener noreferrer',
)
Expand Down

0 comments on commit 09a05b3

Please sign in to comment.