fix(v-model): v-model ended with spaces - #7735
Leocardoso94 wants to merge 6 commits into
Conversation
|
|
||
| export function parseModel (val: string): ModelParseResult { | ||
| len = val.length | ||
| val = val.trim() |
There was a problem hiding this comment.
Shouldn't this be above the previous line 🤔
There was a problem hiding this comment.
It's true, I fixed this in the last commit
…e condition in the test
| }).then(done) | ||
| }) | ||
|
|
||
| it('should not create a new property ended with spaces when', () => { |
There was a problem hiding this comment.
Could you add a test that fails without the fix above please? This one passes
Also, could you rename the test title to should work with extra whitespace properties or something similar, please?
There was a problem hiding this comment.
I did not understand the part of the test. Do I create another pull request with only the test? Because the current test fails without this fix
|
The current test does pass without the patch you added but it should fail. I'm asking if you could add a test case that fails without the |
|
Hi @posva , I add a e2e that fails without the Apparently, in the unit test, it was not possible to simulate this case, I believe it only creates the new property with extra spaces only when it is typed in the browser. P.S. The extra property was only created if you pass a v-model from an object like |
|
You needed to add a test with a nested object 😄 |
fix #7730
What kind of change does this PR introduce? (check at least one)
Does this PR introduce a breaking change? (check one)
If yes, please describe the impact and migration path for existing applications:
The PR fulfills these requirements:
devbranch for v2.x (or to a previous version branch), not themasterbranchfix #xxx[,#xxx], where "xxx" is the issue number)If adding a new feature, the PR's description includes:
Other information: