Skip to content

Commit f37c890

Browse files
committed
1 parent cec1733 commit f37c890

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

src/vs/workbench/parts/snippets/electron-browser/snippetsService.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ import { Snippet, SnippetFile, SnippetSource } from 'vs/workbench/parts/snippets
2929
import { ExtensionsRegistry, IExtensionPointUser } from 'vs/workbench/services/extensions/common/extensionsRegistry';
3030
import { languagesExtPoint } from 'vs/workbench/services/mode/common/workbenchModeService';
3131
import { IWorkspaceContextService, IWorkspace } from 'vs/platform/workspace/common/workspace';
32+
import { isFalsyOrEmpty } from 'vs/base/common/arrays';
3233

3334
namespace schema {
3435

@@ -289,8 +290,10 @@ class SnippetsService implements ISnippetsService {
289290
};
290291

291292
return this._fileService.resolveFile(folder).then(stat => {
292-
for (const entry of stat.children) {
293-
addUserSnippet(entry.resource);
293+
if (!isFalsyOrEmpty(stat.children)) {
294+
for (const entry of stat.children) {
295+
addUserSnippet(entry.resource);
296+
}
294297
}
295298
}).then(() => {
296299
// watch

0 commit comments

Comments
 (0)