Skip to content

Commit a9a046e

Browse files
committed
100% coverage
1 parent 5293a74 commit a9a046e

File tree

1 file changed

+14
-17
lines changed

1 file changed

+14
-17
lines changed

src/util/env.js

Lines changed: 14 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -53,25 +53,22 @@ exports.isIE9 =
5353
*/
5454

5555
if (inBrowser && !exports.isIE9) {
56-
if (
56+
var isWebkitTrans =
5757
window.ontransitionend === undefined &&
5858
window.onwebkittransitionend !== undefined
59-
) {
60-
exports.transitionProp = 'WebkitTransition'
61-
exports.transitionEndEvent = 'webkitTransitionEnd'
62-
} else {
63-
exports.transitionProp = 'transition'
64-
exports.transitionEndEvent = 'transitionend'
65-
}
66-
67-
if (
59+
var isWebkitAnim =
6860
window.onanimationend === undefined &&
6961
window.onwebkitanimationend !== undefined
70-
) {
71-
exports.animationProp = 'WebkitAnimation'
72-
exports.animationEndEvent = 'webkitAnimationEnd'
73-
} else {
74-
exports.animationProp = 'animation'
75-
exports.animationEndEvent = 'animationend'
76-
}
62+
exports.transitionProp = isWebkitTrans
63+
? 'WebkitTransition'
64+
: 'transition'
65+
exports.transitionEndEvent = isWebkitTrans
66+
? 'webkitTransitionEnd'
67+
: 'transitionend'
68+
exports.animationProp = isWebkitAnim
69+
? 'WebkitAnimation'
70+
: 'animation'
71+
exports.animationEndEvent = isWebkitAnim
72+
? 'webkitAnimationEnd'
73+
: 'animationend'
7774
}

0 commit comments

Comments
 (0)