From 8b55dc9c5938a2c7450275199474566553dd1ea7 Mon Sep 17 00:00:00 2001 From: Andrew Scott Date: Mon, 26 Jun 2023 17:51:06 -0700 Subject: [PATCH] chore: improve comment about data source casing --- src/coalesce-vue/src/api-client.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/coalesce-vue/src/api-client.ts b/src/coalesce-vue/src/api-client.ts index 981d536fc..be0d27652 100644 --- a/src/coalesce-vue/src/api-client.ts +++ b/src/coalesce-vue/src/api-client.ts @@ -297,8 +297,9 @@ export function mapQueryToParams( if ("dataSource" in dto) { var dataSourceMeta = Object.values(modelMeta.dataSources).find( - // Match case insensitively on the DS name, because it feels like - // you should be able to use the PascalCase DS name here. + // Match case insensitively on the DS name, + // because sometimes it'll be camelCase (keys of `modelMeta.dataSources`) + // and sometimes it'll be PascalCase (values of `modelMeta.dataSources[x].name`). (d) => d.name.toLowerCase() == dto.dataSource.toLowerCase() );