File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -16,6 +16,7 @@ const useSketchActions = () => {
1616 const unsavedChanges = useSelector ( ( state ) => state . ide . unsavedChanges ) ;
1717 const authenticated = useSelector ( ( state ) => state . user . authenticated ) ;
1818 const project = useSelector ( ( state ) => state . project ) ;
19+ const user = useSelector ( ( state ) => state . user ) ;
1920 const canEditProjectName = useSelector ( selectCanEditSketch ) ;
2021 const dispatch = useDispatch ( ) ;
2122 const { t } = useTranslation ( ) ;
@@ -40,8 +41,10 @@ const useSketchActions = () => {
4041 }
4142
4243 function downloadSketch ( ) {
43- dispatch ( autosaveProject ( ) ) ;
44- exportProjectAsZip ( project . id ) ;
44+ if ( authenticated && user . id === project . owner . id ) {
45+ dispatch ( autosaveProject ( ) ) ;
46+ exportProjectAsZip ( project . id ) ;
47+ }
4548 }
4649
4750 function shareSketch ( ) {
You can’t perform that action at this time.
0 commit comments