vuejs / v2.cn.vuejs.org

🇨🇳 Chinese translation for v2.vuejs.org
https://v2.cn.vuejs.org
MIT License
1.86k stars 3.42k forks source link

refactor: replace deprecated String.prototype.substr() #1203

Closed CommanderRoot closed 2 years ago

CommanderRoot commented 2 years ago

String.prototype.substr() is deprecated so we replace it with String.prototype.slice() which works similarily but isn't deprecated. .substr() probably isn't going away anytime soon but the change is trivial so it doesn't hurt to do it.

Jinjiang commented 2 years ago

Hi @CommanderRoot thanks for your contribution. Since it's a source-code-level change, we'd like you to send a PR to the original English docsite first. Once it has been accepted, we will sync this up from there. Hope you can understand that. Thanks again.