From 794fb6a122d9dc7d9fe94e49c93befaf33da1a73 Mon Sep 17 00:00:00 2001 From: Laurent Cozic Date: Mon, 4 Jan 2021 16:17:06 +0000 Subject: [PATCH] Plugins: Fixes #4285: Allow API paths that contain 4 elements --- packages/lib/services/plugins/api/JoplinData.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/lib/services/plugins/api/JoplinData.ts b/packages/lib/services/plugins/api/JoplinData.ts index 13157c9d9b..00666fa157 100644 --- a/packages/lib/services/plugins/api/JoplinData.ts +++ b/packages/lib/services/plugins/api/JoplinData.ts @@ -54,7 +54,7 @@ export default class JoplinData { if (!Array.isArray(path)) throw new Error(`Path must be an array: ${JSON.stringify(path)}`); if (path.length < 1) throw new Error(`Path must have at least one element: ${JSON.stringify(path)}`); - if (path.length > 3) throw new Error(`Path must have no more than 3 elements: ${JSON.stringify(path)}`); + if (path.length > 4) throw new Error(`Path must have no more than 4 elements: ${JSON.stringify(path)}`); for (const p of path) { if (!this.pathSegmentRegex_.test(p)) throw new Error(`Path segments must only contain lowercase letters and digits: ${JSON.stringify(path)}`);