-
Notifications
You must be signed in to change notification settings - Fork 29.9k
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
console.timeEnd shouldn't throw if there is no matching label #3514
Comments
I'm not saying the current behavior is write or wrong, but it looks like it's been that way for quite a while. Seems that Chrome does not throw in a similar situation. |
Neither does Firefox AFAICT |
If we're going to use Chrome and Firefox as models, then we should just ignore invalid labels and not print anything. |
@bnoordhuis do you remember the original purpose for throwing (it looks like you landed the commit)? We would still have to assume that someone, somewhere is relying on that exception being thrown, and treat this as a semver major change |
Fixed in #5901 |
There is a test expecting that behavior, but it probably isn't a sensible behavior.
A better behavior would be to fail silently while printing a message to stderr saying there is no corresponding label.
The text was updated successfully, but these errors were encountered: