@@ -17,7 +17,8 @@ import {
17
17
nextTick ,
18
18
warn ,
19
19
warnDeprecated ,
20
- isVueWrapper
20
+ isVueWrapper ,
21
+ keys
21
22
} from 'shared/util'
22
23
import { isPlainObject } from 'shared/validators'
23
24
import { isElementVisible } from 'shared/is-visible'
@@ -124,17 +125,14 @@ export default class Wrapper implements BaseWrapper {
124
125
let classes = classAttribute ? classAttribute . split ( ' ' ) : [ ]
125
126
// Handle converting cssmodules identifiers back to the original class name
126
127
if ( this . vm && this . vm . $style ) {
127
- const cssModuleIdentifiers = Object . keys ( this . vm . $style ) . reduce (
128
- ( acc , key ) => {
129
- // $FlowIgnore
130
- const moduleIdent = this . vm . $style [ key ]
131
- if ( moduleIdent ) {
132
- acc [ moduleIdent . split ( ' ' ) [ 0 ] ] = key
133
- }
134
- return acc
135
- } ,
136
- { }
137
- )
128
+ const cssModuleIdentifiers = keys ( this . vm . $style ) . reduce ( ( acc , key ) => {
129
+ // $FlowIgnore
130
+ const moduleIdent = this . vm . $style [ key ]
131
+ if ( moduleIdent ) {
132
+ acc [ moduleIdent . split ( ' ' ) [ 0 ] ] = key
133
+ }
134
+ return acc
135
+ } , { } )
138
136
classes = classes . map ( name => cssModuleIdentifiers [ name ] || name )
139
137
}
140
138
@@ -480,7 +478,7 @@ export default class Wrapper implements BaseWrapper {
480
478
const computed = this . vm . _computedWatchers
481
479
? formatJSON (
482
480
// $FlowIgnore
483
- ...Object . keys ( this . vm . _computedWatchers ) . map ( computedKey => ( {
481
+ ...keys ( this . vm . _computedWatchers ) . map ( computedKey => ( {
484
482
// $FlowIgnore
485
483
[ computedKey ] : this . vm [ computedKey ]
486
484
} ) )
@@ -680,7 +678,7 @@ export default class Wrapper implements BaseWrapper {
680
678
}
681
679
this . __warnIfDestroyed ( )
682
680
683
- Object . keys ( methods ) . forEach ( key => {
681
+ keys ( methods ) . forEach ( key => {
684
682
// $FlowIgnore : Problem with possibly null this.vm
685
683
this . vm [ key ] = methods [ key ]
686
684
// $FlowIgnore : Problem with possibly null this.vm
@@ -717,7 +715,7 @@ export default class Wrapper implements BaseWrapper {
717
715
718
716
this . __warnIfDestroyed ( )
719
717
720
- Object . keys ( data ) . forEach ( key => {
718
+ keys ( data ) . forEach ( key => {
721
719
// Don't let people set entire objects, because reactivity won't work
722
720
if (
723
721
isPlainObject ( data [ key ] ) &&
0 commit comments