Skip to content

Commit bcf749b

Browse files
committed
refactor: add comments
1 parent 175e0a0 commit bcf749b

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

packages/shared/util.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -66,13 +66,10 @@ export const isPhantomJS = UA && UA.includes &&
6666
export const isEdge = UA && UA.indexOf('edge/') > 0
6767
export const isChrome = UA && /chrome\/\d+/.test(UA) && !isEdge
6868

69+
// get the event used to trigger v-model handler that updates bound data
6970
export function getCheckedEvent () {
7071
const version = Vue.version
7172

72-
if (semver.satisfies(version, '2.0 - 2.1.8')) {
73-
return 'change'
74-
}
75-
7673
if (semver.satisfies(version, '2.1.9 - 2.1.10')) {
7774
return 'click'
7875
}
@@ -81,5 +78,6 @@ export function getCheckedEvent () {
8178
return isChrome ? 'click' : 'change'
8279
}
8380

81+
// change is handler for version 2.0 - 2.1.8, and 2.5+
8482
return 'change'
8583
}

0 commit comments

Comments
 (0)