This repository was archived by the owner on Feb 26, 2024. It is now read-only.
Invalid assumption of a class to be a factory#93
Open
tusharmath wants to merge 1 commit intoangular:masterfrom
Open
Invalid assumption of a class to be a factory#93tusharmath wants to merge 1 commit intoangular:masterfrom
tusharmath wants to merge 1 commit intoangular:masterfrom
Conversation
Author
|
@vojtajina Not sure why the build is failing. I see that it doesn't even work in master. Would it be possible to merge without the build passing? This issue is not letting my patch go to production :( |
After minifying your javascript it is possible that the class names get changed, such that they are no more adhering to the standard of starting a class name with a capital letter. Thus the isClass util fun returns false in such cases, even though the class has some fields set in the prototype object. The solution is to first check the prototype object for keys and then check for class name. Fixes angular#92
Contributor
|
Indeed seeing this issue. |
Author
|
@vojtajina Can you please comment if this can be merged? |
Contributor
|
I don't know that having prototype methods means something is a class. I think we need to be more explicit. |
Author
|
I totally agree. But this logic is already being used to differentiate between classes and function . This pull request only refines the hack for the time being so that people who are using it in production don't face issues |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
Uglify converts all class names to single letter lower case ones the factory provider automatically get created instead of the class provider. This should help rectify it.
Reproducable: always
Browsers: Chrome 39.0.2171.95
Operating System: OS X
Steps to reproduce