LEGACY REPO. This repository is for maintenance of the legacy LitElement library. The LitElement base class is now part of the Lit library, which is developed in the lit monorepo.
When using @query with cache: true, it generates the key based on the passed in name - but name only exists for legacy decorators. This results in the key always being __undefined, so multiple uses of @query in one component result in all of them using using the same cached value. See the code here. This should probably be replaced with:
When using
@query
withcache: true
, it generates thekey
based on the passed inname
- butname
only exists for legacy decorators. This results in the key always being__undefined
, so multiple uses of@query
in one component result in all of them using using the same cached value. See the code here. This should probably be replaced with:If this looks like a good solution, I can send a PR.