Skip to content

Commit 1c9ad53

Browse files
authored
fix: skip recommendation for binary file (Acode-Foundation#2446)
1 parent 0a5237a commit 1c9ad53

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

src/lib/editorFile.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -232,6 +232,7 @@ function maybeRecommendLanguageModeExtension(file, modeInfo) {
232232
if (appSettings.value.recommendExtensions === false) return;
233233
if (!isInitialPluginLoadComplete()) return;
234234
if (modeInfo?.name !== "text" || modeInfo.supportsFile(file.filename)) return;
235+
if (helpers.isBinary(file.filename || file.uri)) return;
235236

236237
void import("./languageModeRecommendations").then(
237238
({ default: recommend }) => {

0 commit comments

Comments
 (0)