@@ -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
} ) )
@@ -678,7 +676,7 @@ export default class Wrapper implements BaseWrapper {
678
676
}
679
677
this . __warnIfDestroyed ( )
680
678
681
- Object . keys ( methods ) . forEach ( key => {
679
+ keys ( methods ) . forEach ( key => {
682
680
// $FlowIgnore : Problem with possibly null this.vm
683
681
this . vm [ key ] = methods [ key ]
684
682
// $FlowIgnore : Problem with possibly null this.vm
@@ -715,7 +713,7 @@ export default class Wrapper implements BaseWrapper {
715
713
716
714
this . __warnIfDestroyed ( )
717
715
718
- Object . keys ( data ) . forEach ( key => {
716
+ keys ( data ) . forEach ( key => {
719
717
// Don't let people set entire objects, because reactivity won't work
720
718
if (
721
719
isPlainObject ( data [ key ] ) &&
0 commit comments