From 013d226ae39dc81dc00cbcd03738fa8a222a1036 Mon Sep 17 00:00:00 2001 From: Asger F Date: Fri, 6 Sep 2024 13:46:26 +0200 Subject: [PATCH] JS: Update comment --- .../lib/semmle/javascript/dataflow/internal/Contents.qll | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/javascript/ql/lib/semmle/javascript/dataflow/internal/Contents.qll b/javascript/ql/lib/semmle/javascript/dataflow/internal/Contents.qll index 3ccff93d020..fc86032c502 100644 --- a/javascript/ql/lib/semmle/javascript/dataflow/internal/Contents.qll +++ b/javascript/ql/lib/semmle/javascript/dataflow/internal/Contents.qll @@ -254,11 +254,8 @@ module Public { /** Gets the singleton content to be accessed. */ Content asSingleton() { this = MkSingletonContent(result) } - /** Gets the property name to be accessed. */ - PropertyName asPropertyName() { - // TODO: array indices should be mapped to a ContentSet that also reads from UnknownArrayElement - result = this.asSingleton().asPropertyName() - } + /** Gets the property name to be accessed, provided that this is a singleton content set. */ + PropertyName asPropertyName() { result = this.asSingleton().asPropertyName() } /** Gets the array index to be accessed. */ int asArrayIndex() { result = this.asSingleton().asArrayIndex() }