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

Gracefully handle invalid directives #71

Merged
merged 1 commit into from
Apr 2, 2015

Conversation

DrewML
Copy link
Collaborator

@DrewML DrewML commented Apr 2, 2015

Fix as discussed in #39. Let me know if you want to change the copy used in the warning.

Issue can be replicated with this plnkr.

This fix warns the user, and prevents the inspector from failing.

@DrewML
Copy link
Collaborator Author

DrewML commented Apr 2, 2015

@rev087 Is invoke[2][0] in this context always === the name of the directive? I just realized it may be more useful to include the directive name in the warning.

@rev087
Copy link
Owner

rev087 commented Apr 2, 2015

this.name contains the name of the directive, if it is defined

rev087 added a commit that referenced this pull request Apr 2, 2015
Gracefully handle invalid directives
@rev087 rev087 merged commit a6e6326 into rev087:master Apr 2, 2015
rev087 added a commit that referenced this pull request Apr 2, 2015
@rev087
Copy link
Owner

rev087 commented Apr 2, 2015

Adding the name is definitely important, just remember to update the test (I'm monkeypatching the console.warn call and checking for the whole string in the assert, but a substring should suffice since the string will change with the name).

@DrewML DrewML deleted the warnOnBadDirective branch April 2, 2015 16:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants