Skip to content

Commit 850845a

Browse files
committed
fix bug where i forgot to pass in the cm instance to hide the hinter
1 parent 44e5cfc commit 850845a

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

client/modules/IDE/components/Editor/hinter.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ const hinter = new Fuse(hinterDefinition.p5Hinter, {
1818
});
1919

2020
/** Hides the hinter. */
21-
export function hideHinter() {
22-
CodeMirror.showHint(this._cm, () => {}, {});
21+
export function hideHinter(cmInstance) {
22+
CodeMirror.showHint(cmInstance, () => {}, {});
2323
}
2424

2525
/**

client/modules/IDE/components/Editor/index.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ class Editor extends React.Component {
269269
if (this.props.autocompleteHinter !== prevProps.autocompleteHinter) {
270270
if (!this.props.autocompleteHinter) {
271271
// close the hinter window once the preference is turned off
272-
hideHinter();
272+
hideHinter(this._cm);
273273
}
274274
}
275275

0 commit comments

Comments
 (0)