mirror of
https://github.com/whoswhip/Sharpbin.git
synced 2026-12-06 02:48:43 +00:00
fix: correct syntax selection logic for file drag and drop handling
This commit is contained in:
@@ -231,8 +231,7 @@
|
||||
const syntax = syntaxFromExtension(file.name.split('.').pop() || '');
|
||||
if (syntax && selectedSyntax !== syntax) {
|
||||
selectedSyntax = syntax;
|
||||
}
|
||||
else (!syntax && selectedSyntax !== 'plaintext') {
|
||||
} else if (!syntax && selectedSyntax !== 'plaintext') {
|
||||
selectedSyntax = 'plaintext';
|
||||
}
|
||||
title = file.name;
|
||||
|
||||
Reference in New Issue
Block a user