Skip to content

fix: when multiple --host is set, the localhost address is wrong #10428

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

Closed
wants to merge 2 commits into from

Conversation

btea
Copy link
Collaborator

@btea btea commented Oct 11, 2022

Description

fix #10424

Additional context


What is the purpose of this pull request?

  • Bug fix
  • New Feature
  • Documentation update
  • Other

Before submitting the PR, please make sure you do the following

  • Read the Contributing Guidelines.
  • Read the Pull Request Guidelines and follow the Commit Convention.
  • Check that there isn't already a PR that solves the problem the same way to avoid creating a duplicate.
  • Provide a description in this PR that addresses what the PR is solving, or reference the issue that it solves (e.g. fixes #123).
  • Ideally, include relevant tests that fail without this PR but pass with it.

Comment on lines +59 to +63
if (Array.isArray(item[1])) {
const filter_value = [...new Set(item[1])]
//@ts-ignore
options[item[0]] =
filter_value.length === 1 ? filter_value[0] : filter_value
Copy link
Member

Choose a reason for hiding this comment

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

If it's an array, I think we can simply take the last one and assign it. So it'd be the same logic as #10474

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes, so I'll close this pr.

@btea btea closed this Oct 16, 2022
@btea btea deleted the fix/localhost-url branch October 17, 2022 23:39
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.

Vite Local address is badly formatted when using multiple --host
3 participants