Skip to content

chore(compiler-sfc): replace substr with slice #12564

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

Merged
merged 3 commits into from
Jul 4, 2022
Merged

Conversation

webfansplz
Copy link
Member

@webfansplz webfansplz commented Jun 20, 2022

What kind of change does this PR introduce? (check at least one)

  • Bugfix
  • Feature
  • Code style update
  • Refactor
  • Build-related changes
  • Other, please describe:

Does this PR introduce a breaking change? (check one)

  • Yes
  • No

Other information:

The substr is deprecated.
See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/substr

@jacekkarczmarczyk
Copy link

isn't -1 even better?

image

Co-authored-by: Pouya Mohammadkhani <[email protected]>
@yyx990803 yyx990803 merged commit 6f0d2e6 into vuejs:main Jul 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants