Skip to content
This repository has been archived by the owner on Aug 11, 2021. It is now read-only.

fix: Prevent crash with nameless package #48

Open
wants to merge 1 commit into
base: latest
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ function lifecycle (pkg, stage, wd, opts) {
}

function _incorrectWorkingDirectory (wd, pkg) {
return wd.lastIndexOf(pkg.name) !== wd.length - pkg.name.length
return wd.lastIndexOf(pkg.name) !== wd.length - (typeof pkg.name === 'string' ? pkg.name.length : 0)
}

function lifecycle_ (pkg, stage, wd, opts, env, cb) {
Expand Down