You've already forked joplin
mirror of
https://github.com/laurent22/joplin.git
synced 2025-06-27 23:28:38 +02:00
Plugins: Fixes #4285: Allow API paths that contain 4 elements
This commit is contained in:
@ -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)}`);
|
||||
|
Reference in New Issue
Block a user