-
-
Notifications
You must be signed in to change notification settings - Fork 33.7k
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
Need judge styles[transitionProp 'Duration'] is undefined #7444
Comments
Please, make sure to boil down repros to the strict minimal when reporting a bug. |
I made a repros for this bug, https://github.com/niboac/vue-element-test, can you have a look again please, thanks. |
You still have too many things (like vue-router and element-ui (not sure if it's used though)). Please use the forums or Discord first and come back if you find out it's a bug |
So a solution is to do like that:
That's an all fix. I have the same issue and it's very annoying. |
Seeing this issue all of the sudden on tests running on our CI server. I can't quite explain it or why it just suddenly cropped up. Conditions are basically identical on CI and locally so it doesn't make any sense. Seems to be intermittent. Rerunning multiple times resulted in a success eventually. Is this a timing bug? |
Yes. Usually can be reproduced when tests are doing concurrent. |
Version
2.5.13
Reproduction link
https://github.com/niboac/testingvue
Steps to reproduce
When I run unit test, it shows:
/Users/cb/repo/blade-vue-ui/node_modules/vue/dist/vue.runtime.common.js:6904;
var transitionDurations = styles[transitionProp 'Duration'].split(', ');
TypeError: Cannot read property 'split' of undefined;
I think we need judge styles[transitionProp 'Duration'] is undefined or not.
What is expected?
styles[transitionProp 'Duration'] is defined.
What is actually happening?
styles[transitionProp 'Duration'] is NOT defined.
I FIXED it with those:
var styles = window.getComputedStyle(el);
var transitionDelays = styles[transitionProp 'Delay']? styles[transitionProp 'Delay'].split(', '):[];
var transitionDurations = styles[transitionProp 'Duration']?styles[transitionProp 'Duration'].split(', '):[];
var transitionTimeout = getTimeout(transitionDelays, transitionDurations);
var animationDelays = styles[animationProp 'Delay']?styles[animationProp 'Delay'].split(', '):[];
var animationDurations = styles[animationProp 'Duration']? styles[animationProp 'Duration'].split(', '):[];
var animationTimeout = getTimeout(animationDelays, animationDurations);
The text was updated successfully, but these errors were encountered: