From 12c0ad0e042b70a591a8e947fc584c7409eaae4d Mon Sep 17 00:00:00 2001 From: Asger F Date: Fri, 10 Oct 2025 10:42:01 +0200 Subject: [PATCH] JS: Stop dependeding on getPath() for toString() --- javascript/ql/lib/semmle/javascript/ApiGraphs.qll | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/javascript/ql/lib/semmle/javascript/ApiGraphs.qll b/javascript/ql/lib/semmle/javascript/ApiGraphs.qll index 1a96e25b3b9..85fda109ffa 100644 --- a/javascript/ql/lib/semmle/javascript/ApiGraphs.qll +++ b/javascript/ql/lib/semmle/javascript/ApiGraphs.qll @@ -613,12 +613,12 @@ module API { /** A node corresponding to a definition of an API component. */ class Definition extends Node, Impl::TDef { - override string toString() { result = "def " + this.getPath() } + override string toString() { result = "def " + this.getInducingNode().toString() } } /** A node corresponding to the use of an API component. */ class Use extends Node, Impl::TUse { - override string toString() { result = "use " + this.getPath() } + override string toString() { result = "use " + this.getInducingNode().toString() } } /** Gets the root node. */