Skip to content

Commit

Permalink
Merge branch 'fix/emitted-events-cache' of github.com:BrettLargent/te…
Browse files Browse the repository at this point in the history
…st-utils into fix/emitted-events-cache
  • Loading branch information
BrettLargent committed Apr 26, 2022
2 parents e680bdc + 63ecfbf commit 6ac9659
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/vueWrapper.ts
Expand Up @@ -29,7 +29,7 @@ export class VueWrapper<
> & {
$emit: (event: any, ...args: any[]) => void
} & ComponentCustomProperties = ComponentPublicInstance
> extends BaseWrapper<Node> {
> extends BaseWrapper<Node> {
private componentVM: T
private rootVM: ComponentPublicInstance | undefined | null
private __app: App | null
Expand All @@ -54,8 +54,8 @@ export class VueWrapper<
// in both cases, we return `vm` directly instead
this.componentVM =
vm &&
// a component with a setup that returns a render function will have no `devtoolsRawSetupState`
(vm.$ as unknown as { devtoolsRawSetupState: any }).devtoolsRawSetupState
// a component with a setup that returns a render function will have no `devtoolsRawSetupState`
(vm.$ as unknown as { devtoolsRawSetupState: any }).devtoolsRawSetupState
? ((vm.$ as any).proxy as T)
: (vm as T)
this.__setProps = setProps
Expand Down Expand Up @@ -99,12 +99,12 @@ export class VueWrapper<

const emits = vm.$options.emits
? // if emits is declared as an array
Array.isArray(vm.$options.emits)
Array.isArray(vm.$options.emits)
? // use it
vm.$options.emits
vm.$options.emits
: // otherwise it's declared as an object
// and we only need the keys
Object.keys(vm.$options.emits)
// and we only need the keys
Object.keys(vm.$options.emits)
: []

const elementRoots = this.getRootNodes().filter(
Expand Down

0 comments on commit 6ac9659

Please sign in to comment.