Skip to content

Commit 8e7ca1b

Browse files
committed
Only show comments indication if experiment is turned on
1 parent c8201ad commit 8e7ca1b

File tree

1 file changed

+8
-5
lines changed
  • packages/app/src/app/overmind/effects/vscode

1 file changed

+8
-5
lines changed

packages/app/src/app/overmind/effects/vscode/index.ts

+8-5
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ import { listen } from 'codesandbox-api';
2828
import FontFaceObserver from 'fontfaceobserver';
2929
import { debounce } from 'lodash-es';
3030
import * as childProcess from 'node-services/lib/child_process';
31+
import { COMMENTS } from '@codesandbox/common/lib/utils/feature-flags';
3132
import { json } from 'overmind';
3233
import io from 'socket.io-client';
3334

@@ -1102,12 +1103,14 @@ export class VSCodeEffect {
11021103

11031104
this.modelCursorPositionListener = activeEditor.onDidChangeCursorPosition(
11041105
cursor => {
1105-
const model = activeEditor.getModel();
1106+
if (COMMENTS) {
1107+
const model = activeEditor.getModel();
11061108

1107-
this.modelsHandler.updateLineCommentIndication(
1108-
model,
1109-
cursor.position.lineNumber
1110-
);
1109+
this.modelsHandler.updateLineCommentIndication(
1110+
model,
1111+
cursor.position.lineNumber
1112+
);
1113+
}
11111114
}
11121115
);
11131116

0 commit comments

Comments
 (0)