mirror of https://github.com/laurent22/joplin.git
Plugins: Fixes #4285: Allow API paths that contain 4 elements
parent
ec7cccf573
commit
794fb6a122
|
@ -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)}`);
|
||||
|
|
Loading…
Reference in New Issue