Skip to content
This repository has been archived by the owner on Mar 10, 2020. It is now read-only.

Commit

Permalink
fix: exception when dir is empty (#680)
Browse files Browse the repository at this point in the history
* fix: exception when dir is empty

* Update ls.js
  • Loading branch information
hacdias authored and daviddias committed Jan 27, 2018
1 parent 12e23ee commit ec04f6e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/files/ls.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
const promisify = require('promisify-es6')

const transform = function (res, callback) {
callback(null, res.Entries.map((entry) => {
const entries = res.Entries || []

callback(null, entries.map((entry) => {
return {
name: entry.Name,
type: entry.Type,
Expand Down

0 comments on commit ec04f6e

Please sign in to comment.