From ac51f721805ab37651c676df0863c97505eb8867 Mon Sep 17 00:00:00 2001 From: "D. Berge" Date: Thu, 20 May 2021 18:10:51 +0200 Subject: [PATCH] Ignore empty path parts in info.get() --- lib/www/server/lib/db/info/get.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/www/server/lib/db/info/get.js b/lib/www/server/lib/db/info/get.js index 56cfd9c..1cc562c 100644 --- a/lib/www/server/lib/db/info/get.js +++ b/lib/www/server/lib/db/info/get.js @@ -2,7 +2,7 @@ const { setSurvey } = require('../connection'); async function get (projectId, path, opts = {}) { const client = await setSurvey(projectId); - const [key, ...subkey] = path.split("/"); + const [key, ...subkey] = path.split("/").filter(i => i.trim().length); const text = ` SELECT value