From 1ad7ece72ccd9fe20065f529ca4a92feb904a904 Mon Sep 17 00:00:00 2001 From: lukasmartinelli Date: Wed, 14 Sep 2016 20:22:32 +0200 Subject: [PATCH] Correct style upload --- src/toolbar.jsx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/toolbar.jsx b/src/toolbar.jsx index 99973daa..fbbb6931 100644 --- a/src/toolbar.jsx +++ b/src/toolbar.jsx @@ -12,7 +12,7 @@ import MdSave from 'react-icons/lib/md/save' import MdMap from 'react-icons/lib/md/map' -import { GlStyle } from './style.js' +import style from './style.js' import { fullHeight } from './theme.js' import theme from './theme.js'; @@ -40,8 +40,7 @@ export class Toolbar extends React.Component { const reader = new FileReader(); reader.readAsText(file, "UTF-8"); reader.onload = e => { - const style = JSON.parse(e.target.result); - this.props.onStyleUpload(GlStyle.fromJSON(style)); + this.props.onStyleUpload(style.fromJSON(JSON.parse(e.target.result))); } reader.onerror = e => console.log(e.target); }