Skip to content

Commit f723922

Browse files
fix(overmind): point to correct mode
1 parent 7dda0d8 commit f723922

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

packages/node_modules/overmind-angular/src/directive.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ export class OvermindTrackDirective implements OnInit, OnDestroy {
4040
) {
4141
this.component = (this.viewContainer as any)._view.component
4242
this.overmind = overmind
43-
if (this.overmind.mode === MODE_SSR) {
43+
if (this.overmind.mode.mode === MODE_SSR) {
4444
return
4545
}
4646

@@ -66,7 +66,7 @@ export class OvermindTrackDirective implements OnInit, OnDestroy {
6666
}
6767
}
6868
ngOnInit() {
69-
if (this.overmind.mode === MODE_SSR) {
69+
if (this.overmind.mode.mode === MODE_SSR) {
7070
return
7171
}
7272

@@ -116,7 +116,7 @@ export class OvermindTrackDirective implements OnInit, OnDestroy {
116116
}
117117

118118
ngOnDestroy() {
119-
if (this.overmind.mode === MODE_SSR) {
119+
if (this.overmind.mode.mode === MODE_SSR) {
120120
return
121121
}
122122

packages/node_modules/overmind-react/src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ export const createHook = <Config extends IConfiguration>(
8787
Config
8888
>
8989

90-
if ((overmind as any).mode === MODE_SSR) {
90+
if ((overmind as any).mode.mode === MODE_SSR) {
9191
return {
9292
state: overmind.state,
9393
actions: overmind.actions,

packages/node_modules/overmind-vue/src/index.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ function createMixin(overmind, propsCallback) {
1111

1212
return {
1313
beforeMount(this: any) {
14-
if (overmind.mode === MODE_SSR) {
14+
if (overmind.mode.mode === MODE_SSR) {
1515
this.overmind = {
1616
state: overmind.state,
1717
actions: overmind.actions,
@@ -58,15 +58,15 @@ function createMixin(overmind, propsCallback) {
5858
}
5959
},
6060
beforeUpdate(this: any) {
61-
if (overmind.mode === MODE_SSR) return
61+
if (overmind.mode.mode === MODE_SSR) return
6262

6363
this[OVERMIND].tree.track(this[OVERMIND].onUpdate)
6464
},
6565
...(IS_PRODUCTION
6666
? null
6767
: {
6868
mounted(this: any) {
69-
if (overmind.mode === MODE_SSR) return
69+
if (overmind.mode.mode === MODE_SSR) return
7070

7171
overmind.eventHub.emitAsync(EventType.COMPONENT_ADD, {
7272
componentId,
@@ -76,7 +76,7 @@ function createMixin(overmind, propsCallback) {
7676
})
7777
},
7878
updated(this: any) {
79-
if (overmind.mode === MODE_SSR) return
79+
if (overmind.mode.mode === MODE_SSR) return
8080

8181
overmind.eventHub.emitAsync(EventType.COMPONENT_UPDATE, {
8282
componentId,
@@ -88,7 +88,7 @@ function createMixin(overmind, propsCallback) {
8888
},
8989
}),
9090
beforeDestroy(this: any) {
91-
if (overmind.mode === MODE_SSR) return
91+
if (overmind.mode.mode === MODE_SSR) return
9292

9393
// @ts-ignore
9494
overmind.proxyStateTree.disposeTree(this[OVERMIND].tree)

0 commit comments

Comments
 (0)