@@ -42,7 +42,7 @@ export type AutocompleteDecoration = {
4242 editButton ?: HTMLElement
4343}
4444export type AutocompleteOptions = {
45- targetClass : NamedNode ,
45+ targetClass ? : NamedNode ,
4646 currentObject ?: NamedNode ,
4747 currentName ?: string ,
4848 queryParams : QueryParameters
@@ -193,7 +193,7 @@ export async function renderAutoComplete (dom: HTMLDocument,
193193 }
194194 let bindings
195195 try {
196- bindings = await queryPublicDataByName ( filter , OrgClass , languagePrefs , options . queryParams )
196+ bindings = await queryPublicDataByName ( filter , targetClass as any , languagePrefs , options . queryParams ) // @@ any
197197 // bindings = await queryDbpedia(sparql)
198198 } catch ( err ) {
199199 complain ( 'Error querying db of organizations: ' + err )
@@ -237,7 +237,8 @@ export async function renderAutoComplete (dom: HTMLDocument,
237237 } // refreshList
238238
239239 // const queryParams: QueryParameters = options.queryParams
240- const OrgClass = options . targetClass // kb.sym('http://umbel.org/umbel/rc/EducationalOrganization') // @@@ other
240+ const targetClass = options . targetClass
241+ if ( ! targetClass ) throw new Error ( 'need class' )
241242 if ( decoration . acceptButton ) {
242243 decoration . acceptButton . addEventListener ( 'click' , acceptButtonHandler , false )
243244 }
0 commit comments