Skip to content
This repository was archived by the owner on Jan 8, 2025. It is now read-only.

Commit 6b550bb

Browse files
sertonixGuilleW
andauthored
compact in lib/snippets.js
Co-authored-by: GuilleW <GuilleW@users.noreply.github.com>
1 parent 97d3eb0 commit 6b550bb

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

lib/snippets.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -274,8 +274,7 @@ module.exports = {
274274

275275
loadSnippetsDirectory (snippetsDirPath, callback) {
276276
fs.stat(snippetsDirPath, (error, stat) => {
277-
if (error) return callback(null, {});
278-
if (!stat.isDirectory()) return callback(null, {});
277+
if (error || !stat.isDirectory()) return callback(null, {});
279278

280279
fs.readdir(snippetsDirPath, (error, entries) => {
281280
if (error) {

0 commit comments

Comments
 (0)