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

Make console.warn named function #7811

Merged
merged 4 commits into from
Nov 26, 2022
Merged

Conversation

wtachau
Copy link
Contributor

@wtachau wtachau commented Nov 25, 2022

We have some code that relies on introspecting the name of console.warn— some metaprogramming to provide dev-only logs. This update to make console.warn an anonymous function means it no longer has a name, which breaks that assumption.

Normally:

console.warn.name
> 'warn'

In SvelteKit dev:

console.warn.name
> ''

@changeset-bot
Copy link

changeset-bot bot commented Nov 25, 2022

🦋 Changeset detected

Latest commit: a7a7281

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@sveltejs/kit Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@dummdidumm
Copy link
Member

What's the reason for this? Stack trace?

@wtachau
Copy link
Contributor Author

wtachau commented Nov 25, 2022

What's the reason for this? Stack trace?

@dummdidumm Sorry for the delay! I created this PR in github.dev and it didn't prompt me for a description. Just updated the PR.

@Rich-Harris Rich-Harris merged commit eebae40 into sveltejs:master Nov 26, 2022
@Rich-Harris
Copy link
Member

thank you!

@wtachau wtachau deleted the patch-1 branch November 26, 2022 19:57
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.

3 participants