From f79fb7576974c278749c049820d3bd3d344a0ccb Mon Sep 17 00:00:00 2001 From: Pomax Date: Tue, 5 Jan 2016 23:13:27 -0800 Subject: [PATCH] . --- components/App.jsx | 8 +++++++- components/Graphic.jsx | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/components/App.jsx b/components/App.jsx index e6b3cbe6..8d916027 100644 --- a/components/App.jsx +++ b/components/App.jsx @@ -3,4 +3,10 @@ var ReactDOM = require("react-dom"); var Article = require("./Article.jsx"); var style = require("../stylesheets/style.less"); -ReactDOM.render(
, document.getElementById("article")); +ReactDOM.render(
, document.getElementById("article"), function() { + // trigger a #hash navigation + if (window.location.hash) { + var hash = window.location.hash; + window.location.hash = hash; + } +}); diff --git a/components/Graphic.jsx b/components/Graphic.jsx index 7607ab98..b049940f 100644 --- a/components/Graphic.jsx +++ b/components/Graphic.jsx @@ -219,7 +219,7 @@ var Graphic = React.createClass({ setCurve: function(c) { var pts = []; - c = Array.from(arguments); + c = Array.prototype.slice.call(arguments); c.forEach(nc => { pts = pts.concat(nc.points); });