File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -55,8 +55,8 @@ window.downloadSketch = () => {
5555// add model to store
5656import modelData from './models/circle_error.d3sketch' ;
5757import JSONToSketchData from './src/shape/JSONToSketchData.js' ;
58- JSONToSketchData ( JSON . parse ( modelData ) ) . then ( sketch => {
59- store . dispatch ( actions . openSketch ( sketch ) ) ;
58+ JSONToSketchData ( JSON . parse ( modelData ) ) . then ( data => {
59+ store . dispatch ( actions . openSketch ( { data } ) ) ;
6060} ) ;
6161
6262// default css
Original file line number Diff line number Diff line change @@ -106,9 +106,9 @@ class App extends React.Component {
106106 case 'D3SKETCH' :
107107 case 'JSON' :
108108 const url = URL . createObjectURL ( file ) ;
109- const data = await fetch ( url ) . then ( result => result . json ( ) ) ;
110- const sketchData = await JSONToSketchData ( data ) ;
111- openSketch ( sketchData ) ;
109+ const json = await fetch ( url ) . then ( result => result . json ( ) ) ;
110+ const data = await JSONToSketchData ( json ) ;
111+ openSketch ( { data } ) ;
112112 break ;
113113 case 'JPG' :
114114 case 'JPEG' :
You can’t perform that action at this time.
0 commit comments