Skip to content

Commit 1dc4af9

Browse files
committed
Do not submit views for project "0"
1 parent 254549e commit 1dc4af9

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/containers/tw-windchime-submitter.jsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ const isOptedOut = () => {
3030
class TWWindchimeSubmitter extends React.Component {
3131
componentDidUpdate (prevProps) {
3232
if (
33-
(this.props.isRunning && !prevProps.isRunning) &&
34-
this.props.projectId
33+
(this.props.isStarted && !prevProps.isStarted) &&
34+
this.props.projectId !== '0'
3535
) {
3636
this.submit();
3737
}
@@ -72,12 +72,12 @@ class TWWindchimeSubmitter extends React.Component {
7272

7373
TWWindchimeSubmitter.propTypes = {
7474
isEmbedded: PropTypes.bool.isRequired,
75-
isRunning: PropTypes.bool.isRequired,
75+
isStarted: PropTypes.bool.isRequired,
7676
projectId: PropTypes.string.isRequired
7777
};
7878

7979
const mapStateToProps = state => ({
80-
isRunning: state.scratchGui.vmStatus.running,
80+
isStarted: state.scratchGui.vmStatus.running,
8181
projectId: state.scratchGui.projectState.projectId
8282
});
8383

0 commit comments

Comments
 (0)