Closed nandin-borjigin closed 8 years ago
I found a similar issue #188, the exception stack is extremly identical I've tried to import and install validator before router, but it's still not working
related #130
Solved, watch my comment on issue 130
vue & vue-validator version
1.0.25, 2.1.3
Reproduction Link
The problem is heavily related to development environment, so I can't make a minimal reproduction sample.
Steps to reproduce
vue-router
. Before introducingvue-validator
all things worked fine. And then I put some validator code into it which causes the source code to throw an exception sayingUncaught TypeError: Cannot read property 'required' of undefined
. I removed all validator code and added a small set of testing code likeIt still caused the exception. And then, the VERY STRANGE thing happened:
Command + R
(ctrl + R
for windows) to reload the page, that exception comes back. The code was totally untouched between step 2 and 3, but the result was different.I added a exception break point , and that exception comes from
resolveAsset
function, which is called fromBaseValidation.prototype._resolveValidator
.The incoming arguments of
resolveAsset
function looks like:Edit
components optionsIt's very strange because hot-updating doesn't cause this exception but full reload does. I don't know if the details above are enough to figure out what's going wrong.