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

feat: add constructor hint #3626

Merged
merged 1 commit into from
Oct 3, 2021
Merged

feat: add constructor hint #3626

merged 1 commit into from
Oct 3, 2021

Conversation

Hazlank
Copy link
Contributor

@Hazlank Hazlank commented Sep 5, 2021

Same with vue and vuex,add hint to tell user use new operator

@Hazlank Hazlank force-pushed the feat/add-hint branch 2 times, most recently from 6408d84 to 5cc5f7e Compare September 5, 2021 10:32
Copy link
Member

@posva posva left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Can you make the dev warn, dev only, capitalize router and move the instance of check to the first param of the warn?

@Hazlank Hazlank force-pushed the feat/add-hint branch 2 times, most recently from 8a79865 to c4f67b4 Compare September 7, 2021 03:03
@Hazlank
Copy link
Contributor Author

Hazlank commented Sep 7, 2021

@posva warn don't need to judge dev。In other places, it has been judged outside,except base.js

@Hazlank Hazlank changed the title feat: add constructor hint refactor: refactor warn function Sep 7, 2021
@Hazlank Hazlank changed the title refactor: refactor warn function feat: add constructor hint Sep 8, 2021
console.error(err)
if (process.env.NODE_ENV !== 'production') {
warn(false, 'uncaught error during route navigation:')
console.error(err)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's move the console.error outside of the if statement as it should be kept in production

@Hazlank
Copy link
Contributor Author

Hazlank commented Oct 2, 2021

@posva my bad,I changed it 😂

@posva posva merged commit 28b769b into vuejs:dev Oct 3, 2021
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