File tree 1 file changed +5
-2
lines changed
1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -16,6 +16,7 @@ const useSketchActions = () => {
16
16
const unsavedChanges = useSelector ( ( state ) => state . ide . unsavedChanges ) ;
17
17
const authenticated = useSelector ( ( state ) => state . user . authenticated ) ;
18
18
const project = useSelector ( ( state ) => state . project ) ;
19
+ const user = useSelector ( ( state ) => state . user ) ;
19
20
const canEditProjectName = useSelector ( selectCanEditSketch ) ;
20
21
const dispatch = useDispatch ( ) ;
21
22
const { t } = useTranslation ( ) ;
@@ -40,8 +41,10 @@ const useSketchActions = () => {
40
41
}
41
42
42
43
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
+ }
45
48
}
46
49
47
50
function shareSketch ( ) {
You can’t perform that action at this time.
0 commit comments