Skip to content

Commit 8144974

Browse files
devvaannshabose
authored andcommitted
refactor: replace ?. with x && y
1 parent 8bdbb7b commit 8144974

File tree

1 file changed

+4
-1
lines changed
  • src/extensionsIntegrated/CustomSnippets

1 file changed

+4
-1
lines changed

src/extensionsIntegrated/CustomSnippets/helper.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,10 @@ define(function (require, exports, module) {
309309
*/
310310
function isSnippetSupportedInLanguageContext(snippet, languageContext, editor) {
311311
// Check for "all" languages support (both optimized and non-optimized)
312-
if (snippet.supportsAllLanguages === true || snippet.fileExtension?.toLowerCase() === "all") {
312+
if (
313+
snippet.supportsAllLanguages === true ||
314+
(snippet.fileExtension && snippet.fileExtension.toLowerCase() === "all")
315+
) {
313316
return true;
314317
}
315318

0 commit comments

Comments
 (0)