Skip to content

Commit

Permalink
fix: lookup functions match user-set title
Browse files Browse the repository at this point in the history
  • Loading branch information
kswenson committed Dec 23, 2024
1 parent 405a673 commit 55c605c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions v3/src/models/formula/utils/name-mapping-utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,11 @@ export const getDisplayNameMap = (options: IDisplayNameMapOptions, useSafeSymbol
displayNameMap.localNames.caseIndex = localAttrIdToCanonical(CASE_INDEX_FAKE_ATTR_ID)

dataSets.forEach(dataSet => {
if (dataSet.name) {
if (dataSet.title) {
// No LOCAL_ATTR prefix is necessary for external attributes. They always need to be resolved manually by custom
// mathjs functions (like "lookupByIndex"). Also, it's never necessary to use safe names, as these names
// are string constants, not a symbols, so MathJS will not care about special characters there.
const dataSetKey = key(dataSet.name, false)
// are string constants, not symbols, so MathJS will not care about special characters there.
const dataSetKey = key(dataSet.title, false)
displayNameMap.dataSet[dataSetKey] = {
id: idToCanonical(dataSet.id),
attribute: {}
Expand Down

0 comments on commit 55c605c

Please sign in to comment.