describo / crate-builder-component

A VueJS UI component to build an RO-Crate
MIT License
6 stars 3 forks source link

AutoCompoleteComponent fails when trying to reference dataPacks #49

Closed beepsoft closed 1 year ago

beepsoft commented 1 year ago

I try to add a new entity like this:

https://github.com/describo/crate-builder-component/assets/1926265/2d95657f-f388-4093-b288-106b03527235

And I get this error:

Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'dataPacks')

The problem seems to be with this newly added code, failing at line 136:

https://github.com/describo/crate-builder-component/blob/953047880d375c6c36216c0799fa214dce41c8ba/src/crate-builder/RenderEntity/AutoComplete.component.vue#L135-L143

I don't know if it is relevant, but in my app I don't have a lookup property defined and it worked before without it.

marcolarosa commented 1 year ago

Yes - sorry. I didn't think about the case when a lookup is not enabled. It's definitely that. I tested with a lookup class that didn't have the methods but not without a lookup class altogether!