Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

no models in ember inspector -> typesMapFor has no entries #8205

Closed
patricklx opened this issue Oct 13, 2022 · 2 comments · Fixed by #8213 or #8215
Closed

no models in ember inspector -> typesMapFor has no entries #8205

patricklx opened this issue Oct 13, 2022 · 2 comments · Fixed by #8213 or #8215
Labels
🏷️ bug This PR primarily fixes a reported issue

Comments

@patricklx
Copy link
Contributor

patricklx commented Oct 13, 2022

currently ember inspector often does not show any models because typesMapFor does not have any entries.

https://github.com/emberjs/data/blob/master/packages/debug/addon/index.js#L85

ember data: 4.7.0

Was it always an initializer? I load most of my data in an initializer .

@patricklx patricklx changed the title typesMapFor has no entries no models in ember inspector -> typesMapFor has no entries Oct 13, 2022
@runspired runspired added the upstream Upstream Dependency Fix Required label Oct 14, 2022
@runspired
Copy link
Contributor

I believe this line needs to be updated to work with 4.7+

const __createRecordData = Store.prototype._createRecordData;

@runspired runspired added Bug and removed upstream Upstream Dependency Fix Required labels Oct 14, 2022
@patricklx
Copy link
Contributor Author

patricklx commented Oct 14, 2022

@runspired I just tested the change and its not working. its only setup once inspector is opened. it will not see any model types created before.

you probably need to to the same as for store. overwrite the prototype of InstanceCache instead of the instance?

edit: i wasnt able to get the InstanceCache class as its not exported

patricklx added a commit to patricklx/data that referenced this issue Oct 14, 2022
runspired pushed a commit that referenced this issue Oct 14, 2022
* fix: inspector type detection 2. attempt #8205

resolves #8205

* remove install hook
@runspired runspired added 🏷️ bug This PR primarily fixes a reported issue and removed Bug labels Sep 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏷️ bug This PR primarily fixes a reported issue
Projects
None yet
2 participants