Skip to content

Commit 74a28dd

Browse files
authored
S?.message?.includes is not a function (fix microsoft#185530) (microsoft#185534)
1 parent 73eb619 commit 74a28dd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/vs/platform/telemetry/common/errorTelemetry.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ export default abstract class BaseErrorTelemetry {
8989

9090
// If it's the no telemetry error it doesn't get logged
9191
// TOOD @lramos15 hacking in FileOperation error because it's too messy to adopt ErrorNoTelemetry. A better solution should be found
92-
if (ErrorNoTelemetry.isErrorNoTelemetry(err) || err instanceof FileOperationError || err?.message?.includes('Unable to read file')) {
92+
if (ErrorNoTelemetry.isErrorNoTelemetry(err) || err instanceof FileOperationError || (typeof err?.message === 'string' && err.message.includes('Unable to read file'))) {
9393
return;
9494
}
9595

0 commit comments

Comments
 (0)