diff --git a/ccp/js/methodlistcontroller.js b/ccp/js/methodlistcontroller.js index 7ed4ec3..79c82ed 100644 --- a/ccp/js/methodlistcontroller.js +++ b/ccp/js/methodlistcontroller.js @@ -2,7 +2,7 @@ class CCPMethodList extends HTMLElement{ #boot; #rootdoc; - #data; + #data = null; #filtered; #dragged = null; #searchfield = null; @@ -197,8 +197,9 @@ class CCPMethodList extends HTMLElement{ getCategoryHints(){ const s = new Set() + if(this.#data === null) return []; for(let i=0; i < this.#data.length; i++){ - const cat = m.metadata.filter(md=>md.role === "category").map(md=>md.title) + const cat = this.#data[i].metadata.filter(md=>md.role === "category").map(md=>md.title) s.add(cat) } return [...s]