Skip to content

Commit

Permalink
fix(examples): re-enable HMR logic
Browse files Browse the repository at this point in the history
  • Loading branch information
postspectacular committed Sep 10, 2018
1 parent dc61898 commit 54e59a0
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions examples/hdom-canvas-clock/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ const hand = (r1: number, r2: number, theta: number, fill: string, eps = 0.5) =>
[[r1, theta - eps], [r2, theta], [r1, theta + eps]].map((p) => toCartesian2(p))];
};

start(() => {
const cancel = start(() => {
const now = new Date();
const t = now.getTime() / 1000 - now.getTimezoneOffset() * 60;
const sec = (t % 60) / 60;
Expand Down Expand Up @@ -56,9 +56,7 @@ start(() => {
"Source code"]];
});

// const hot = (<any>module).hot;
// if (hot) {
// hot.dispose(() => {
// cancel();
// });
// }
const hot = (<any>module).hot;
if (hot) {
hot.dispose(cancel);
}

0 comments on commit 54e59a0

Please sign in to comment.