File tree Expand file tree Collapse file tree 1 file changed +6
-10
lines changed
packages/runtime-core/src Expand file tree Collapse file tree 1 file changed +6
-10
lines changed Original file line number Diff line number Diff line change @@ -151,16 +151,12 @@ export function emit(
151
151
}
152
152
153
153
let args = rawArgs
154
- let isModelListener
155
- let modifiers
156
- if (
157
- __COMPAT__ &&
158
- ( isModelListener = compatModelEventPrefix + event in props )
159
- ) {
160
- modifiers = props . modelModifiers
161
- } else if ( ( isModelListener = event . startsWith ( 'update:' ) ) ) {
162
- modifiers = getModelModifiers ( props , event . slice ( 7 ) )
163
- }
154
+ const isCompatModelListener =
155
+ __COMPAT__ && compatModelEventPrefix + event in props
156
+ const isModelListener = isCompatModelListener || event . startsWith ( 'update:' )
157
+ const modifiers = isCompatModelListener
158
+ ? props . modelModifiers
159
+ : isModelListener && getModelModifiers ( props , event . slice ( 7 ) )
164
160
165
161
// for v-model update:xxx events, apply modifiers on args
166
162
if ( modifiers ) {
You can’t perform that action at this time.
0 commit comments