diff --git a/jstree/jstree-tests.ts b/jstree/jstree-tests.ts index 1c8ef86c48..a6ea0eb290 100644 --- a/jstree/jstree-tests.ts +++ b/jstree/jstree-tests.ts @@ -109,3 +109,8 @@ var tree = $('a').jstree(); tree.move_node('a', 'b', 0, (node: any, new_par: any, pos: any) => { }, true, true); tree.copy_node('a', 'b', 0, (node: any, new_par: any, pos: any) => { }, true, true); +// #10271 jstree - get_path params not marked to be optional +tree.get_path('nodeId'); +tree.get_path('nodeId', '/'); +tree.get_path('nodeId', '/', true); + diff --git a/jstree/jstree.d.ts b/jstree/jstree.d.ts index f3961f7e3e..dde9a24b67 100644 --- a/jstree/jstree.d.ts +++ b/jstree/jstree.d.ts @@ -830,7 +830,7 @@ interface JSTree extends JQuery { * @param {Boolean} ids if set to true build the path using ID, otherwise node text is used * @return {mixed} */ - get_path: (obj: any, glue: string, ids: boolean) => any; + get_path: (obj: any, glue?: string, ids?: boolean) => any; /** * get the next visible node that is below the `obj` node. If `strict` is set to `true` only sibling nodes are returned.