Commit 7c9c01b2 authored by Cliff Li's avatar Cliff Li
Browse files

Fix scrolling

parent b909a436
......@@ -149,6 +149,18 @@ Raven.context(() => {
view: () => m(layout, m(Error404)),
};
m.route.setOrig = m.route.set;
m.route.set = (path, data, options) => {
m.route.setOrig(path, data, options);
window.scrollTo(0, 0);
};
m.route.linkOrig = m.route.link;
m.route.link = vnode => {
m.route.linkOrig(vnode);
window.scrollTo(0, 0);
};
m.route(document.body, '/', result);
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment