@@ -104,8 +104,8 @@ const rewriteRdef = function (item) {
104104 const content = item . innerHTML ;
105105 let title = item . getAttribute ( "title" ) || content ;
106106 let type = "role" ;
107- const abstract = item . parentNode . querySelectorAll ( ".role-abstract" ) ; //TODO: maybe #105
108- if ( abstract . innerText === "True" ) {
107+ const abstract = item . parentNode . querySelector ( ".role-abstract" ) ;
108+ if ( abstract ? .innerText === "True" ) { //NOTE: optional chaining b/c synonym roles do not have characteristics tables
109109 type = "abstract role" ;
110110 }
111111 const dRef = item . nextElementSibling ;
@@ -192,8 +192,8 @@ const renderRoleIndexEntry = function (item) {
192192 // is this a role or an abstract role
193193 let type = "role" ;
194194 let isAbstract = false ;
195- const abstract = container . querySelectorAll ( ".role-abstract" ) ; //TODO: maybe #105
196- if ( abstract . innerText === "True" ) {
195+ const abstract = container . querySelector ( ".role-abstract" ) ;
196+ if ( abstract ? .innerText === "True" ) { //NOTE: optional chaining b/c synonym roles do not have characteristics tables
197197 type = "abstract role" ;
198198 isAbstract = true ;
199199 }
@@ -256,8 +256,8 @@ const renderIndexEntry = (indexTest, rdef) => {
256256 const roleFromNode = container . querySelector ( ".role-namefrom" ) ;
257257 // is this a role or an abstract role
258258 let isAbstract = false ;
259- const abstract = container . querySelectorAll ( ".role-abstract" ) ; //TODO: maybe #105
260- if ( abstract . innerText === "True" ) {
259+ const abstract = container . querySelector ( ".role-abstract" ) ;
260+ if ( abstract ? .innerText === "True" ) { //NOTE: optional chaining b/c synonym roles do not have characteristics tables
261261 isAbstract = true ;
262262 }
263263 if ( ! isAbstract && roleFromNode ) {
0 commit comments