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() }