Skip to content

Commit

Permalink
fix(devtools): should support ssr
Browse files Browse the repository at this point in the history
  • Loading branch information
NetanelBasal committed Jun 10, 2019
1 parent 16e5fa1 commit 9da1f9e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions akita/src/devtools.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { isDefined } from './isDefined';
import { rootDispatcher } from './rootDispatcher';
import { __stores__ } from './stores';
import { capitalize } from './captialize';
import { isNotBrowser } from './root';

export type DevtoolsOptions = {
/** maximum allowed actions to be stored in the history tree */
Expand All @@ -22,6 +23,8 @@ export type NgZoneLike = { run: any };
export function akitaDevtools(ngZone: NgZoneLike, options?: Partial<DevtoolsOptions>);
export function akitaDevtools(options?: Partial<DevtoolsOptions>);
export function akitaDevtools(ngZoneOrOptions?: NgZoneLike | Partial<DevtoolsOptions>, options: Partial<DevtoolsOptions> = {}) {
if(isNotBrowser) return;

if (!(window as any).__REDUX_DEVTOOLS_EXTENSION__) {
return;
}
Expand Down

0 comments on commit 9da1f9e

Please sign in to comment.