diff options
Diffstat (limited to 'ui/src/frontend/perf.ts')
-rw-r--r-- | ui/src/frontend/perf.ts | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/ui/src/frontend/perf.ts b/ui/src/frontend/perf.ts index 8ab8c4ab4..d884a5ff9 100644 --- a/ui/src/frontend/perf.ts +++ b/ui/src/frontend/perf.ts @@ -15,13 +15,14 @@ import * as m from 'mithril'; +import {Actions} from '../common/actions'; import {globals} from './globals'; import {PanelContainer} from './panel_container'; /** * Shorthand for if globals perf debug mode is on. */ -export const perfDebug = () => globals.frontendLocalState.perfDebug; +export const perfDebug = () => globals.state.perfDebug; /** * Returns performance.now() if perfDebug is enabled, otherwise 0. @@ -113,7 +114,7 @@ class PerfDisplay { m('section', globals.rafScheduler.renderPerfStats()), m('button.close-button', { - onclick: () => globals.frontendLocalState.togglePerfDebug(), + onclick: () => globals.dispatch(Actions.togglePerfDebug({})), }, m('i.material-icons', 'close')), this.containers.map((c, i) => m('section', c.renderPerfStats(i))) |