Skip to content

Commit eabd4d8

Browse files
committed
Check for event before stopPropagation, add ids to uitest elements
1 parent 712d2fb commit eabd4d8

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

src/oceans/ui.jsx

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1275,7 +1275,9 @@ let UnwrappedPond = class Pond extends React.Component {
12751275
setState({pondFishTransitionStartTime: $time(), pondClickedFish: null});
12761276
}
12771277

1278-
e.stopPropagation();
1278+
if (e) {
1279+
e.stopPropagation();
1280+
}
12791281
};
12801282

12811283
onPondClick = e => {
@@ -1376,7 +1378,9 @@ let UnwrappedPond = class Pond extends React.Component {
13761378
}
13771379
}
13781380

1379-
e.stopPropagation();
1381+
if (e) {
1382+
e.stopPropagation();
1383+
}
13801384
};
13811385

13821386
render() {
@@ -1420,13 +1424,14 @@ let UnwrappedPond = class Pond extends React.Component {
14201424
...(!state.pondPanelShowing ? {} : styles.bgTeal)
14211425
}}
14221426
onClick={this.onPondPanelButtonClick}
1427+
id="uitest-info-btn"
14231428
>
14241429
<FontAwesomeIcon icon={faInfo} style={styles.infoIcon} />
14251430
</div>
14261431
)}
14271432
<img style={styles.pondBot} src={aiBotClosed} />
14281433
{state.canSkipPond && (
1429-
<div>
1434+
<div id="uitest-nav-btns">
14301435
{state.appMode === AppMode.FishLong ? (
14311436
<div>
14321437
<Button

0 commit comments

Comments
 (0)