fix: wrong condition in build command
Close https://github.com/napi-rs/napi-rs/issues/219
This commit is contained in:
parent
dca2bb322e
commit
4272505901
1 changed files with 1 additions and 1 deletions
|
@ -60,7 +60,7 @@ export class BuildCommand extends Command {
|
|||
throw new TypeError('Could not parse the Cargo.toml')
|
||||
}
|
||||
|
||||
if (tomlContent.package ?? tomlContent.package.name) {
|
||||
if (tomlContent.package?.name) {
|
||||
dylibName = tomlContent.package.name.replace(/-/g, '_')
|
||||
} else {
|
||||
throw new TypeError('No package.name field in Cargo.toml')
|
||||
|
|
Loading…
Reference in a new issue