@opengis/fastify-table 1.1.1 → 1.1.2

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opengis/fastify-table",
3
- "version": "1.1.1",
3
+ "version": "1.1.2",
4
4
  "type": "module",
5
5
  "description": "core-plugins",
6
6
  "main": "index.js",
@@ -37,6 +37,9 @@ async function getTemplateData(template) {
37
37
  // multi file template: select, etc
38
38
  if (template.length > 1) {
39
39
  const data = await Promise.all(template.map(async el => readFileData(el[1])));
40
+ if (Array.isArray(data[0])) {
41
+ return data[0];
42
+ }
40
43
  const result = {};
41
44
  template.forEach((el, i) => {
42
45
  Object.assign(result, typeof data[i] === 'object' ? data[i] : { [el[2]]: data[i] });