Skip to content

Commit

Permalink
fix: properly identify whether isDirectory
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisbbreuer committed Sep 11, 2022
1 parent 6d0fa25 commit 918bee0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions .stacks/src/scripts/copy-files.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ const destinations = [

const copyRecursiveSync = function (src: string, dest: string) {
const exists = existsSync(src)
const stats = exists ? statSync(src) : false
// const isDirectory = exists && stats.isDirectory()
const isDirectory = stats
const stats = statSync(src)

const isDirectory = exists && stats.isDirectory()

if (isDirectory) {
readdirSync(src).forEach((childItemName) => {
Expand Down

0 comments on commit 918bee0

Please sign in to comment.