Skip to content

Commit

Permalink
replace ALL occurences of the dataset identifier (#98)
Browse files Browse the repository at this point in the history
  • Loading branch information
jvigliotta authored Sep 8, 2023
1 parent 5f8f5a7 commit bcd0852
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ function importWithDatasetsModifier(openmct) {
const datasetMapping = changesWithDatasetMapping.mapping;

Object.entries(datasetMapping).forEach(([referencedDataset, dataset]) => {
stringifiedObjectTree = stringifiedObjectTree.replace(referencedDataset, dataset);
let regex = new RegExp(referencedDataset, 'g');
stringifiedObjectTree = stringifiedObjectTree.replace(regex, dataset);
});

changesWithDatasetMapping.selectFile.body = stringifiedObjectTree;
Expand Down

0 comments on commit bcd0852

Please sign in to comment.