@isoftdata/utility-dashboard-backend 1.5.0 → 1.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/index.js +7 -0
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -174,6 +174,13 @@ const loadOutputParameterValues = async(mysqlConnection, { definitionList = [],
174
174
  * @returns {{sql: string, values: Array}}
175
175
  */
176
176
  const parameterizeQuery = (query, parameterValues) => {
177
+ // Don't parameterize a lack of a query
178
+ if (!query) {
179
+ return {
180
+ sql: '',
181
+ values: [],
182
+ }
183
+ }
177
184
  const queryParameterValues = parameterValues.reduce((acc, val) => {
178
185
  return val.queryValues ? {
179
186
  ...acc,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@isoftdata/utility-dashboard-backend",
3
- "version": "1.5.0",
3
+ "version": "1.5.1",
4
4
  "description": "A utility for formatting chart and report data to be usable by the frontend dashboard component.",
5
5
  "main": "index.js",
6
6
  "scripts": {