fix bug where you could save another user's sketches with keyboard shortcut

This commit is contained in:
Cassie Tarakajian 2016-11-02 22:19:05 -04:00
parent d33b6a354f
commit 23fb53bc9b

View file

@ -141,7 +141,9 @@ class IDEView extends React.Component {
if (e.keyCode === 83 && ((e.metaKey && this.isMac) || (e.ctrlKey && !this.isMac))) {
e.preventDefault();
e.stopPropagation();
if (this.props.project.owner && this.props.project.owner.id === this.props.user.id) {
this.props.saveProject();
}
// 13 === enter
} else if (e.keyCode === 13 && e.shiftKey && ((e.metaKey && this.isMac) || (e.ctrlKey && !this.isMac))) {
e.preventDefault();