-
-
Notifications
You must be signed in to change notification settings - Fork 104
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
ContainerDebugAdapter.catalogEntriesByType returns objects of wrong type #120
Comments
Yes. A regexp would be more accurate. Some things to note though. In pods the module name will end with the type so we should modify the regexp to also accept modules that end with the type name (like The inspector currently uses class detection ( |
Ah, interesting. I dug into the inspector code a little while trying to sort this out, but didn't catch that. When you say you don't think we can rely on there only being one word before the type, do you mean something like Assuming both those pods layouts are valid, I think |
as of 3.0 this is now provided by ember (correctly) |
The
ContainerDebugAdapter
'scatalogEntriesByType()
method matches objects by just testing whether the type name appears anywhere within the class name. The result is that many false-positives are returned.eg for
model
:returns:
when I'm pretty sure it should just be:
Not sure how this interacts with pods layouts and the comment in there about different prefixes, but to match "normal" layouts, it seems it should be
exec
ing against something likeRegExp('^[a-zA-Z0-9-_]+\/' + type + '\/(.*)$')
Note: I originally filed this against ember-cli (for some reason) as ember-cli/ember-cli#5002
The text was updated successfully, but these errors were encountered: