Plugins: Fixes #4285: Allow API paths that contain 4 elements

pull/4303/head
Laurent Cozic 2021-01-04 16:17:06 +00:00
parent ec7cccf573
commit 794fb6a122
1 changed files with 1 additions and 1 deletions

View File

@ -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)}`);