diff --git a/public/app/containers/Explore/ElapsedTime.tsx b/public/app/containers/Explore/ElapsedTime.tsx index 123299fd96a..9cd8f674186 100644 --- a/public/app/containers/Explore/ElapsedTime.tsx +++ b/public/app/containers/Explore/ElapsedTime.tsx @@ -4,7 +4,7 @@ const INTERVAL = 150; export default class ElapsedTime extends PureComponent { offset: number; - timer: NodeJS.Timer; + timer: number; state = { elapsed: 0, @@ -12,7 +12,7 @@ export default class ElapsedTime extends PureComponent { start() { this.offset = Date.now(); - this.timer = setInterval(this.tick, INTERVAL); + this.timer = window.setInterval(this.tick, INTERVAL); } tick = () => { diff --git a/public/app/routes/ReactContainer.tsx b/public/app/routes/ReactContainer.tsx index deb16f68bf7..d6d34372090 100644 --- a/public/app/routes/ReactContainer.tsx +++ b/public/app/routes/ReactContainer.tsx @@ -21,8 +21,12 @@ export function reactContainer($route, $location, backendSrv: BackendSrv, dataso restrict: 'E', template: '', link(scope, elem) { - let component = $route.current.locals.component.default; - let props = { + let component = $route.current.locals.component; + // Dynamic imports return whole module, need to extract default export + if (component.default) { + component = component.default; + } + const props = { backendSrv: backendSrv, datasourceSrv: datasourceSrv, };