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

Prevent unnecessary Exception with non-existent links #1387

Merged
merged 3 commits into from
Jun 16, 2017
Merged

Conversation

posva
Copy link
Member

@posva posva commented Apr 30, 2017

Closes #1386

@@ -33,8 +33,9 @@ export function createMatcher (

if (name) {
const record = nameMap[name]
if (process.env.NODE_ENV !== 'production') {
warn(record, `Route with name '${name}' does not exist`)
if (process.env.NODE_ENV !== 'production' && !record) {
Copy link
Member

Choose a reason for hiding this comment

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

behavior should be consistent between prod and dev, so we should move the env check to only apply to the warning.

@posva
Copy link
Member Author

posva commented May 17, 2017

I forgot to ping you @yyx990803 😓

@yyx990803 yyx990803 merged commit ed04db8 into dev Jun 16, 2017
@posva posva deleted the fix-link-err branch June 16, 2017 07:20
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