tanishqgandhi1908 commented on code in PR #6502:
URL: https://github.com/apache/texera/pull/6502#discussion_r3640488121
##########
frontend/src/app/workspace/component/dataset-selection-modal/dataset-selection-modal.component.ts:
##########
@@ -83,7 +83,13 @@ export class DatasetSelectionModalComponent implements
OnInit {
this.datasets = datasets;
const selectedPath = this.data.selectedPath;
if (selectedPath) {
- const [ownerEmail, datasetName, versionName] =
selectedPath.split("/").filter(part => part.length > 0);
+ const segments = selectedPath.split("/").filter(part => part.length
> 0);
+ // Drop the resource-type prefix ("datasets") if present so
owner/dataset/version
+ // line up (the stored path may or may not carry the prefix).
+ if (segments[0] === "datasets") {
Review Comment:
The prefix comes from the shared ResourceType.Datasets enum. And frontend
and backend are consistent
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]